Osirion.Blazor.Cms.Domain 4.1.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Osirion.Blazor.Cms.Domain --version 4.1.0
                    
NuGet\Install-Package Osirion.Blazor.Cms.Domain -Version 4.1.0
                    
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="Osirion.Blazor.Cms.Domain" Version="4.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Osirion.Blazor.Cms.Domain" Version="4.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Osirion.Blazor.Cms.Domain" />
                    
Project file
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 Osirion.Blazor.Cms.Domain --version 4.1.0
                    
#r "nuget: Osirion.Blazor.Cms.Domain, 4.1.0"
                    
#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 Osirion.Blazor.Cms.Domain@4.1.0
                    
#: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=Osirion.Blazor.Cms.Domain&version=4.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Osirion.Blazor.Cms.Domain&version=4.1.0
                    
Install as a Cake Tool

Osirion.Blazor.Cms.Domain

NuGet License

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. ContentItem (namespace Osirion.Blazor.Cms.Domain.Entities) derives from DomainEntity<string>, which derives from Entity<TId>:

public class ContentItem : DomainEntity<string>
{
    public string Title { get; set; } = string.Empty;
    public string Author { get; set; } = string.Empty;
    public string Content { get; set; } = string.Empty;
    public string Path { get; set; } = string.Empty;
    public string Slug { get; set; } = string.Empty;
    public ContentStatus Status { get; set; } = ContentStatus.Published;
    public IReadOnlyList<string> Tags { get; }
    public IReadOnlyList<string> Categories { get; }
    public FrontMatter? Metadata { get; set; }
    // Additional properties
}

ContentItem.Create(id, title, content, path, providerId) builds a validated item. DirectoryItem models a content folder.

Value Objects

Objects that derive from ValueObject and are compared by value. FrontMatter (namespace Osirion.Blazor.Cms.Domain.ValueObjects) holds the parsed front matter of a content file, and SeoMetadata holds search engine metadata. FrontMatter is changed through copies:

var frontMatter = FrontMatter.Create("My first post")
    .WithAuthor("Jane Doe")
    .WithTags(new[] { "blazor", "cms" })
    .WithFeatured(true);

Enumerations

Strong typing for domain concepts (namespace Osirion.Blazor.Cms.Domain.Enums):

public enum ContentStatus
{
    Draft,
    Published,
    Scheduled,
    Archived,
    InReview
}

public enum SortField
{
    Date,
    Title,
    Author,
    LastModified,
    Order,
    Created,
    PublishDate,
    Slug,
    ReadTime
}

public enum SortDirection
{
    Ascending,
    Descending
}

Domain Services and Repositories

Contracts that infrastructure implements. IContentProvider (namespace Osirion.Blazor.Cms.Domain.Services) is the abstraction over a content source such as GitHub or the file system:

public interface IContentProvider
{
    string ProviderId { get; }
    string DisplayName { get; }
    bool IsReadOnly { get; }

    Task<IReadOnlyList<ContentItem>> GetAllItemsAsync(CancellationToken cancellationToken = default);
    Task<ContentItem?> GetItemByPathAsync(string path, CancellationToken cancellationToken = default);
    Task<IReadOnlyList<ContentItem>?> GetItemsByQueryAsync(ContentQuery query, CancellationToken cancellationToken = default);
    // Additional members for ids, urls, categories, tags and directories
}

IContentRepository (namespace Osirion.Blazor.Cms.Domain.Repositories) adds GetByPathAsync, FindByQueryAsync and related persistence operations.

Design Principles

This project follows these design principles:

  1. Persistence Ignorance: Domain entities know nothing about how they are stored
  2. Rich Domain Model: Domain entities contain both data and behavior
  3. Value semantics: Value objects are compared by value and changed through copies
  4. Encapsulation: Internal state is protected
  5. Domain-Driven Design: Modeling based on the ubiquitous language of the domain

Dependencies

The domain layer has minimal dependencies:

  • .NET 9 and .NET 10: Target frameworks
  • Markdig: For Markdown processing
  • YamlDotNet: For front matter parsing
  • Microsoft.AspNetCore.App: Shared framework reference

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product 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 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Osirion.Blazor.Cms.Domain:

Package Downloads
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.

Osirion.Blazor.Cms.Core

Core CMS module for Osirion.Blazor - Provides cms management with provider pattern.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.2.0 250 10/18/2026
4.1.0 263 10/17/2026
4.0.0 171 10/12/2026
3.0.1 289 9/24/2026
3.0.0 243 8/5/2026
2.1.18 368 12/14/2025
2.1.17 325 12/14/2025
2.1.16 329 12/14/2025
2.1.15 303 12/12/2025
2.1.14 593 12/11/2025
2.1.13 579 12/11/2025
2.1.12 386 9/4/2025
2.1.11 351 8/31/2025
2.1.10 374 8/29/2025
2.1.9 391 8/29/2025
2.1.8 391 8/27/2025
2.1.7 497 8/25/2025
2.1.6 293 8/23/2025
2.1.5 368 6/24/2025
2.1.4 358 6/18/2025
Loading failed