NPv.Domain.Core
1.0.1
See the version list below for details.
dotnet add package NPv.Domain.Core --version 1.0.1
NuGet\Install-Package NPv.Domain.Core -Version 1.0.1
<PackageReference Include="NPv.Domain.Core" Version="1.0.1" />
<PackageVersion Include="NPv.Domain.Core" Version="1.0.1" />
<PackageReference Include="NPv.Domain.Core" />
paket add NPv.Domain.Core --version 1.0.1
#r "nuget: NPv.Domain.Core, 1.0.1"
#:package NPv.Domain.Core@1.0.1
#addin nuget:?package=NPv.Domain.Core&version=1.0.1
#tool nuget:?package=NPv.Domain.Core&version=1.0.1
NPv.Domain.Core
Lightweight and reusable building blocks for modeling domain entities in .NET
โจ Overview
NPv.Domain.Core
provides a minimal and consistent base for defining domain entities across services and layers.
It supports clean modeling practices without introducing infrastructure or persistence concerns.
Designed for use in domain-driven applications following clean architecture, this library ensures your domain models stay framework-agnostic and clear.
๐ Features
- โ
Base
Entity
class (withGuid
identity) - ๐
IEntity
interface for generic modeling - ๐ท Optional
[LongText]
attribute for marking large text fields - ๐ Compatible with EF Core and repository abstractions (e.g.,
IGenericRepository
) - ๐งผ No dependencies on infrastructure or frameworks
๐ง Usage
Define your entity class:
public class Customer : Entity
{
public string Name { get; set; } = default!;
}
Use the [LongText]
attribute to mark a string property as nvarchar(max)
:
[LongText]
public string Description { get; set; } = null!;
๐งฉ EF Core Integration
To apply domain-related conventions automatically in Entity Framework Core,
consider using NPv.DataAccess.Ef
,
which includes:
DefaultString256MaxLengthMapping
โ applies default string length mappingGuidV7ValueGenerator
โ for optimized sequential GUIDs
๐ฆ Installation
This package is published as part of the NPv.Foundation.Net
architectural set.
To install via NuGet:
dotnet add package NPv.Domain.Core
๐งฉ Related Packages
NPv.DataAccess.Abstractions
โ generic repository contracts
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NPv.Domain.Core:
Package | Downloads |
---|---|
NPv.DataAccess.Ef
NPv's IGenericRepository realisation for EF including: IDbContextFactory, IDbContextProvider, PerRequestDbContextProvider, ConsoleDbContextProvider |
|
NPv.DataAccess.Abstractions
Minimal interface contract for generic repository and raw SQL execution in .NET applications. Designed for layered architecture, DDD, and flexible data access patterns. |
GitHub repositories
This package is not used by any popular GitHub repositories.