OnionCrafter.Base
1.0.0
See the version list below for details.
dotnet add package OnionCrafter.Base --version 1.0.0
NuGet\Install-Package OnionCrafter.Base -Version 1.0.0
<PackageReference Include="OnionCrafter.Base" Version="1.0.0" />
paket add OnionCrafter.Base --version 1.0.0
#r "nuget: OnionCrafter.Base, 1.0.0"
// Install OnionCrafter.Base as a Cake Addin #addin nuget:?package=OnionCrafter.Base&version=1.0.0 // Install OnionCrafter.Base as a Cake Tool #tool nuget:?package=OnionCrafter.Base&version=1.0.0
OnionCrafter.Base
OnionCrafter.Base is a .NET library that provides a set of minimal base classes to enable fast and secure implementation of entities, services, wrappers and other necessary components within an Onion Architecture.
The library uses MediatR to implement the Mediator pattern, which simplifies the implementation of object-oriented design patterns like the Mediator pattern in an application with less code.
Installation
You can install the OnionCrafter.Base library using the NuGet package manager or the dotnet CLI:
dotnet add package OnionCrafter.Base
Usage
The OnionCrafter.Baselibrary provides an IRequestSchema
interface that represents a schema for making requests that implement the Mediator pattern. This interface extends the MediatR.IRequest<TResponseSchema>
and IBaseRequest
interfaces.
Here's an example of how to use the IRequestSchema
interface:
using OnionCrafter.Base.Wrappers.Responses;
using OnionCrafter.Base.Wrappers.Requests;
public class ExampleRequest : BaseRequestSchema<int, ExampleResponseSchema, ExampleResponseData, ExampleRequestData>
{
public string Name { get; set; }
}
And typed Dependency Injection with options or simple.
public interface ITestService : IService
{
}
public class TestService : ITestService
{
}
public class TestEntity : BaseEntity<int>
{
public string? Name { get; set; }
}
Contributing
We welcome contributions to the OnionCrafter.Base.Wrappers library. If you would like to contribute, please fork the repository and submit a pull request.
License
The OnionCrafter.Base.Wrappers library is released under the Apache 2.0 License. See LICENSE for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- MediatR (>= 12.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on OnionCrafter.Base:
Package | Downloads |
---|---|
OnionCrafter.Service
Provides a set of minimal base classes and interfaces to enable fast and secure implementation of services, service containers, extensions for dependency injections and logging. |
|
OnionCrafter.Feature
Provides a set of minimal base classes to enable fast and secure implementation of handlers, pipeline behavoirs and other necessary components within an onion architecture, uses Mediatr to implement the Mediator pattern. |
|
OnionCrafter.DataAccess
Provides a set of interfaces for managing data access and creating a higher layer of abstraction based on EntityFramework Core. |
GitHub repositories
This package is not used by any popular GitHub repositories.