OptimusFramework.AppService.Generic
2.0.1
dotnet add package OptimusFramework.AppService.Generic --version 2.0.1
NuGet\Install-Package OptimusFramework.AppService.Generic -Version 2.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OptimusFramework.AppService.Generic" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OptimusFramework.AppService.Generic" Version="2.0.1" />
<PackageReference Include="OptimusFramework.AppService.Generic" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OptimusFramework.AppService.Generic --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OptimusFramework.AppService.Generic, 2.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OptimusFramework.AppService.Generic@2.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OptimusFramework.AppService.Generic&version=2.0.1
#tool nuget:?package=OptimusFramework.AppService.Generic&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OptimusFramework.AppService.Generic
Generic application service implementations for the Optimus Framework. Provides Template Method pattern-based CRUD and Store behaviors with dynamic pagination, validation pipeline, and lifecycle hooks.
Features
- CRUD Behavior:
ServiceCrudBehaviorimplementing the full CRUD lifecycle with pre/post hooks - Store Behavior:
ServiceStoreBehaviorfor insert/update operations with validation - List Behavior:
ServiceListBehaviorwith dynamic query building and pagination via System.Linq.Dynamic - Template Method Pattern: Override lifecycle hooks (
OnPreCreate,OnPostCreate,OnPreUpdate,OnPostUpdate,OnPreStore,OnPostStore,OnPreSaveChanges,OnPostSaveChanges) - Message Processing:
MessageProcessorfor validation message pipeline - Pre-built Specializations: Ready-to-use classes for Entity, IdEntity, and NameDesc patterns
Key Classes
| Class | Description |
|---|---|
AppServiceBase |
Base service with IRepoTenant and IDisposable |
AppServiceUoF<TUnitOfWork> |
Service base with Unit of Work access |
ServiceCrudBehavior |
Full CRUD with lifecycle hooks and validation |
ServiceCrudBehaviorUoF |
CRUD with Unit of Work |
ServiceCrudBehaviorRepo |
CRUD with Repository |
ServiceStoreBehavior |
Store (insert/update) with hooks |
ServiceListBehavior |
List with dynamic filtering and pagination |
MessageProcessor |
IMessageProcessor implementation |
Installation
dotnet add package OptimusFramework.AppService.Generic
Usage
using OptimusFramework.AppService.Generic;
public class ProductService : ServiceCrudBehaviorUoF<IMyUnitOfWork, ProductParam, ProductDto, Product, int, ProductFilter>
{
protected override void OnPreCreate(Product entity, ProductParam param)
{
entity.Code = GenerateCode();
}
protected override IQueryable<Product> FindQuery(ProductFilter filter)
{
var query = Context.Products.AsQueryable();
if (!string.IsNullOrEmpty(filter.Name))
query = query.Where(p => p.Name.Contains(filter.Name));
return query;
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AutoMapper (>= 13.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- Newtonsoft.Json (>= 13.0.3)
- OptimusFramework.AppService.Domain (>= 2.0.1)
- OptimusFramework.DataAccess.Domain (>= 2.0.1)
- OptimusFramework.Utils (>= 2.0.1)
- System.Linq.Dynamic.Core (>= 1.4.5)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on OptimusFramework.AppService.Generic:
| Package | Downloads |
|---|---|
|
OptimusFramework.AppService.EFCore
Package Description |
|
|
OptimusLog.AppService
Package Description |
|
|
OptimusSecurity.AppService
Package Description |
|
|
SfeAuth.Core.Generic.Api
Package Description |
|
|
SfeAuth.Core.Domain
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.