RedMaskFramework 1.1.0

dotnet add package RedMaskFramework --version 1.1.0
NuGet\Install-Package RedMaskFramework -Version 1.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="RedMaskFramework" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RedMaskFramework --version 1.1.0
#r "nuget: RedMaskFramework, 1.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.
// Install RedMaskFramework as a Cake Addin
#addin nuget:?package=RedMaskFramework&version=1.1.0

// Install RedMaskFramework as a Cake Tool
#tool nuget:?package=RedMaskFramework&version=1.1.0

RedMaskFramework

small and light framework to help you develop your apps using DDD concepts aucha as IAgreegateRoot,ValueObject,Entity and ....

Aggregates

Aggregates are the basic element of transfer of data storage � you request to load or save whole aggregates. Transactions should not cross aggregate boundaries.

public class User : AggregateRoot<long>
{
    public User( string actorUserName, string password,Email email)
    {
        ActorUserName = actorUserName;
        Password = password;
        Email=email;
    }

    public string ActorUserName { get; private set; }
    public string Password { get; private set; }
    public Email Email {get; private set;}
    
    List<UserActivity> _activities=[];
    public IReadOnlyCollection<UserActivity> Activities => _activities.AsReadOnly();

    List<DynamicData> _dynamicData=[];
    public IReadOnlyCollection<DynamicData> DynamicData => _dynamicData.AsReadOnly();
    
}

Entity

Many objects are not fundamentally defined by their attributes, but rather by a thread of continuity and identity.

public class UserActivity : Entity<long>
{
    public UserActivity(DateTime dateTime,  string actorIp, string action, string controller, string area)
    {
        DateTime = dateTime;
        ActorIp = actorIp;
        Action = action;
        Controller = controller;
        Area = area;
    }

    public DateTime DateTime { get; private set; }
    public long UserId { get; private set; }
    public string ActorIp { get; private set; }
    public string Action { get; private set; }
    public string Controller { get; private set; }
    public string Area { get; private set; }
}

ValueObject

A value object is a small object that represents a simple entity whose equality is not based on identity: i.e. two value objects are equal when they have the same value, not necessarily being the same object.

public sealed record Email : ValueObject
{}

or

public sealed record DynamicData : ValueObjectEntity
{
      public long Id { get;  set; }
      public string Key { get;  set; }
      public string Val { get;  set; }
}

Repository

A repository (or repo) is a type of centrally located storage where you can keep all your project�s files and resources. Any of the project�s stakeholders or developers can pull your repository�s code (or resource) for new feature delivery or bug fixes in the product or software application.

public class UserRepository: IRepository<User>
{
    //..... implementions
}

IUnitOfWork

public class BlogDbContext : DbContext, IUnitOfWork
{
    public BlogDbContext(DbContextOptions<BlogDbContext> options) : base(options) { }

    public DbSet<User> Users { get; set; }

}
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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.0 189 12/17/2023
1.0.0 123 12/8/2023