Osirion.Blazor.Cms.Domain
2.1.3
dotnet add package Osirion.Blazor.Cms.Domain --version 2.1.3
NuGet\Install-Package Osirion.Blazor.Cms.Domain -Version 2.1.3
<PackageReference Include="Osirion.Blazor.Cms.Domain" Version="2.1.3" />
<PackageVersion Include="Osirion.Blazor.Cms.Domain" Version="2.1.3" />
<PackageReference Include="Osirion.Blazor.Cms.Domain" />
paket add Osirion.Blazor.Cms.Domain --version 2.1.3
#r "nuget: Osirion.Blazor.Cms.Domain, 2.1.3"
#addin nuget:?package=Osirion.Blazor.Cms.Domain&version=2.1.3
#tool nuget:?package=Osirion.Blazor.Cms.Domain&version=2.1.3
Osirion.Blazor.Cms.Domain
Domain layer for the Osirion.Blazor CMS ecosystem, containing core entity definitions, value objects, enums, and domain services.
Overview
The Domain project implements the Domain layer in the Clean Architecture pattern, providing the core business entities and logic for the CMS system. This project has minimal dependencies and serves as the foundation for the entire CMS ecosystem.
Key Components
Entities
Core business objects defined by their identity:
public class ContentItem : Entity<Guid>
{
public string Path { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public IReadOnlyDictionary<string, object> Metadata { get; set; }
= new Dictionary<string, object>();
// Additional properties
}
Value Objects
Immutable objects defined by their properties:
public class ContentMetadata : ValueObject
{
public string? Title { get; }
public string? Description { get; }
public DateTime? PublishedDate { get; }
public string? Author { get; }
public IReadOnlyList<string> Tags { get; }
public IReadOnlyList<string> Categories { get; }
public bool IsFeatured { get; }
// Constructor, Equals, GetHashCode implementations
}
Enumerations
Strong typing for domain concepts:
public enum ContentStatus
{
Draft,
Published,
Archived
}
public enum SortField
{
Title,
Date,
Author,
Path
}
public enum SortDirection
{
Ascending,
Descending
}
Domain Services
Core business logic not naturally fitting into entities:
public interface IContentService
{
Task<IReadOnlyList<ContentItem>> GetContentItemsAsync(ContentQuery query);
Task<ContentItem?> GetContentItemByPathAsync(string path);
Task<IReadOnlyList<string>> GetAvailableTagsAsync();
Task<IReadOnlyList<string>> GetAvailableCategoriesAsync();
}
Design Principles
This project follows these design principles:
- Persistence Ignorance: Domain entities know nothing about how they are stored
- Rich Domain Model: Domain entities contain both data and behavior
- Immutability: Value objects are immutable
- Encapsulation: Internal state is protected
- Domain-Driven Design: Modeling based on the ubiquitous language of the domain
Dependencies
The domain layer has minimal dependencies:
- .NET 8.0/.NET 9.0: Target frameworks
- Microsoft.Extensions.DependencyInjection: For dependency injection
- Microsoft.Extensions.Logging.Abstractions: For logging abstractions
License
This project is licensed under the MIT License - see the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. 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. |
-
net8.0
- Markdig (>= 0.41.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- YamlDotNet (>= 16.3.0)
-
net9.0
- Markdig (>= 0.41.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.5)
- YamlDotNet (>= 16.3.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Osirion.Blazor.Cms.Domain:
Package | Downloads |
---|---|
Osirion.Blazor.Cms.Core
Core CMS module for Osirion.Blazor - Provides cms management with provider pattern. |
|
Osirion.Blazor.Cms.Application
Application layer for the Osirion.Blazor CMS ecosystem, implementing core business logic, use cases, and application services for content management. |
|
Osirion.Blazor.Cms.Infrastructure
Infrastructure layer for the Osirion.Blazor CMS ecosystem, implementing repositories, external service integrations, and infrastructure concerns. |
GitHub repositories
This package is not used by any popular GitHub repositories.