alaasmagi.Base.Application
1.1.2
dotnet add package alaasmagi.Base.Application --version 1.1.2
NuGet\Install-Package alaasmagi.Base.Application -Version 1.1.2
<PackageReference Include="alaasmagi.Base.Application" Version="1.1.2" />
<PackageVersion Include="alaasmagi.Base.Application" Version="1.1.2" />
<PackageReference Include="alaasmagi.Base.Application" />
paket add alaasmagi.Base.Application --version 1.1.2
#r "nuget: alaasmagi.Base.Application, 1.1.2"
#:package alaasmagi.Base.Application@1.1.2
#addin nuget:?package=alaasmagi.Base.Application&version=1.1.2
#tool nuget:?package=alaasmagi.Base.Application&version=1.1.2
alaasmagi Base Packages
Reusable base-layer building blocks for .NET applications.
This package set provides shared contracts and generic implementations for common layers:
alaasmagi.Base.Contracts.Domainalaasmagi.Base.Domainalaasmagi.Base.Contracts.DTOalaasmagi.Base.DTOalaasmagi.Base.Contracts.DataAccessalaasmagi.Base.DataAccess.EFalaasmagi.Base.Contracts.Applicationalaasmagi.Base.Applicationalaasmagi.Base.Contracts.Exceptionalaasmagi.Base.Exception
Included Capabilities
These packages cover the common building blocks used across layered applications:
- strongly typed base entity contracts
- domain base classes with metadata, ownership, and soft delete support
- mapper abstractions between layers
- method-response and error models
- generic repository contracts
- generic EF Core repository implementations
- unit-of-work abstractions
- generic application service contracts and implementations
- typed base exceptions and HTTP exceptions
Package Overview
alaasmagi.Base.Contracts.Domain
Defines contracts such as:
IBaseEntity<TKey>IBaseEntityMetaIBaseEntitySoftDeleteIBaseEntityUserId<TKey>IBaseEntityWithMeta<TKey>IBaseEntityWithMetaSoftDelete<TKey>
alaasmagi.Base.Domain
Provides reusable base entity types such as:
BaseEntity<TKey>BaseEntityWithMeta<TKey>BaseEntityWithMetaSoftDelete<TKey>BaseEntityUser<TKey>BaseEntityUserWithMeta<TKey, TUserKey>BaseEntityUserWithMetaSoftDelete<TKey, TUserKey>
alaasmagi.Base.Contracts.DTO
Defines:
IMapper<TUpperEntity, TLowerEntity, TKey>IMethodResponse<TValue>IError<TCode>
alaasmagi.Base.DTO
Provides:
MethodResponse<TValue>MethodResponse<TValue, TError>ErrorError<TCode>ErrorDefaults
alaasmagi.Base.Contracts.DataAccess
Defines:
IBaseRepository<TEntity, TResourceKey, TActor>IBaseRepositorySoftDelete<TEntity, TResourceKey, TActor>IBaseUow
alaasmagi.Base.DataAccess.EF
Provides EF Core implementations such as:
BaseRepository<TDomainEntity, TDataAccessEntity, TMapper, TResourceKey, TActor>BaseRepositorySoftDelete<TDomainEntity, TDataAccessEntity, TMapper, TResourceKey, TActor>BaseUow<TDbContext>
alaasmagi.Base.Contracts.Application
Defines:
IBaseService<TEntity, TKey, TActor>IBaseServiceSoftDelete<TEntity, TKey, TActor>IBaseServiceUow
alaasmagi.Base.Application
Provides:
BaseService<TEntity, TDomainEntity, TRepository, TKey, TActor>BaseServiceSoftDelete<TEntity, TDomainEntity, TRepository, TKey, TActor>BaseServiceUow<TUow>
alaasmagi.Base.Contracts.Exception
Defines:
IBaseException<TCode>IHttpException<TCode>
alaasmagi.Base.Exception
Provides:
BaseExceptionBaseException<TCode>HttpExceptionHttpException<TCode>
Typical Usage
A common setup looks like this:
- Inherit from a
Base.Domainentity type that matches your needs. - Implement an
IMapperbetween your domain model and EF model if those types differ. - Inherit from
BaseRepository<...>orBaseRepositorySoftDelete<...>. - If your application layer uses different models, implement another mapper between application and domain models.
- Inherit from
BaseService<...>orBaseServiceSoftDelete<...>.
Example
using Base.Contracts.DTO;
using Base.DataAccess.EF;
using Base.Domain;
using Microsoft.EntityFrameworkCore;
public class Todo : BaseEntityWithMetaSoftDelete<Guid>
{
public string Title { get; set; } = default!;
}
public class TodoDbEntity : BaseEntityWithMetaSoftDelete<Guid>
{
public string Title { get; set; } = default!;
}
public class TodoMapper : IMapper<Todo, TodoDbEntity, Guid>
{
public Todo? Map(TodoDbEntity? entity) => entity == null
? null
: new Todo
{
Id = entity.Id,
Title = entity.Title,
CreatedAt = entity.CreatedAt,
CreatedBy = entity.CreatedBy,
UpdatedAt = entity.UpdatedAt,
UpdatedBy = entity.UpdatedBy,
IsDeleted = entity.IsDeleted
};
public IEnumerable<Todo>? Map(IEnumerable<TodoDbEntity>? entities) =>
entities?.Select(Map)!;
public TodoDbEntity? Map(Todo? entity) => entity == null
? null
: new TodoDbEntity
{
Id = entity.Id,
Title = entity.Title,
CreatedAt = entity.CreatedAt,
CreatedBy = entity.CreatedBy,
UpdatedAt = entity.UpdatedAt,
UpdatedBy = entity.UpdatedBy,
IsDeleted = entity.IsDeleted
};
public IEnumerable<TodoDbEntity>? Map(IEnumerable<Todo>? entities) =>
entities?.Select(Map)!;
}
public class TodoRepository
: BaseRepositorySoftDelete<Todo, TodoDbEntity, TodoMapper, Guid, Guid>
{
public TodoRepository(DbContext dbContext, TodoMapper mapper)
: base(dbContext, mapper)
{
}
}
Framework and Dependencies
All packages in this repository currently target:
.NET 10.0
Relevant package dependencies used across the set include:
Microsoft.EntityFrameworkCoreMicrosoft.Extensions.Caching.StackExchangeRedisSentrySentry.AspNetCore
Notes
- These packages are designed to be used together, but each package can also be consumed independently where appropriate.
- Keep package versions in sync across the
alaasmagi.Base.*set. Base.DataAccess.EFis intended for EF Core based persistence.- Repository and service methods return
IMethodResponse<T>so calling code can handle success and failure consistently. - Metadata timestamps and actor fields are populated automatically by the EF repository base classes when supported by the entity type.
- User-based scoping is applied automatically when the entity implements
IBaseEntityUserId<TActor>and a non-default actor value is supplied.
| 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. |
-
net10.0
- alaasmagi.Base.Contracts.Application (>= 1.1.2)
- alaasmagi.Base.Contracts.DataAccess (>= 1.1.2)
- alaasmagi.Base.Contracts.Domain (>= 1.1.2)
- alaasmagi.Base.Contracts.DTO (>= 1.1.2)
- alaasmagi.Base.DTO (>= 1.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.2 | 88 | 6/1/2026 |
| 1.1.1 | 97 | 5/24/2026 |
| 1.1.0 | 101 | 4/1/2026 |
| 1.0.11 | 105 | 3/29/2026 |
| 1.0.10 | 103 | 3/20/2026 |
| 1.0.9 | 97 | 3/20/2026 |
| 1.0.8 | 97 | 3/20/2026 |
| 1.0.7 | 98 | 3/19/2026 |
| 1.0.6 | 92 | 3/19/2026 |
| 1.0.5 | 93 | 3/19/2026 |
| 1.0.4 | 98 | 3/18/2026 |
| 1.0.3 | 94 | 3/18/2026 |
| 1.0.2 | 116 | 3/17/2026 |
| 1.0.1 | 96 | 3/17/2026 |
| 1.0.0 | 106 | 3/16/2026 |