AccountSubSystem.Repositories 1.0.0

dotnet add package AccountSubSystem.Repositories --version 1.0.0
                    
NuGet\Install-Package AccountSubSystem.Repositories -Version 1.0.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="AccountSubSystem.Repositories" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AccountSubSystem.Repositories" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AccountSubSystem.Repositories" />
                    
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 AccountSubSystem.Repositories --version 1.0.0
                    
#r "nuget: AccountSubSystem.Repositories, 1.0.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 AccountSubSystem.Repositories@1.0.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=AccountSubSystem.Repositories&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AccountSubSystem.Repositories&version=1.0.0
                    
Install as a Cake Tool

AccountSubSystem.Repositories

EF Core database repositories for the BDJobs Account SubSystem.

This package provides the data access layer for the Account SubSystem. It uses Entity Framework Core with SQL Server to query and persist account-related data, following the Repository pattern used across all BDJobs subsystems.


📦 Installation

.NET CLI

dotnet add package AccountSubSystem.Repositories --version 1.0.0

Package Manager Console

NuGet\Install-Package AccountSubSystem.Repositories -Version 1.0.0

PackageReference (add to your .csproj)

<PackageReference Include="AccountSubSystem.Repositories" Version="1.0.0" />

📋 Requirements

Requirement Value
Target Framework .NET 10.0
Package Version 1.0.0

📁 What's Inside

This package contains:

  • DbContext — EF Core context configured for SQL Server
  • Repository classes — one per aggregate, e.g. UserRepository, AccountRepository
  • DI registration extensionsAddAccountRepositories() extension method to register everything in one line

🚀 Usage

Step 1 — Register repositories in Program.cs

builder.Services.AddAccountRepositories(builder.Configuration);

Step 2 — Inject the repository into your Handler

using AccountSubSystem.Repositories;

public class GetUserQueryHandler
{
    private readonly IUserRepository _userRepository;

    public GetUserQueryHandler(IUserRepository userRepository)
    {
        _userRepository = userRepository;
    }

    public async Task<UserResponseDto> Handle(GetUserQuery query)
    {
        var entities = await _userRepository.GetByIdAsync(query.UserId);

        var aggregateRoot = UserAggregateRoot.FromEntities(entities);
        return aggregateRoot.ToResponseDto();
    }
}

Step 3 — Connection string in appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=YOUR_SERVER;Database=YOUR_DB;Trusted_Connection=True;"
  }
}

🔗 Dependencies

Package Version
AccountSubSystem.Aggregators 1.0.0
SharedSubSystem.DTOs 1.0.0
Microsoft.EntityFrameworkCore 10.0.8
Microsoft.EntityFrameworkCore.SqlServer 10.0.8

All dependencies are installed automatically.


🏗️ Architecture

AccountSubSystem.Repositories sits in the infrastructure layer — it talks to the database and feeds data to the domain (Aggregators).

AccountSubSystem.Handlers
    └── AccountSubSystem.Repositories  ← YOU ARE HERE
        └── AccountSubSystem.Aggregators
            └── AccountSubSystem.DTOs

Data flow:

Handler calls Repository
    → Repository queries SQL Server via EF Core
    → Returns raw entities to Handler
    → Handler passes entities to AggregateRoot

⚠️ Notes

  • This package requires a SQL Server connection string in your appsettings.json.
  • The DbContext uses EF Core migrations — run dotnet ef database update if you are setting up a new environment.
  • Never inject DbContext directly in your API layer — always go through the Repository interface.

👤 Author

BDJobs — Internal NuGet package for the BDJobs Conveyance Billing System.

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AccountSubSystem.Repositories:

Package Downloads
AccountSubSystem.Auth

Login and cookie authentication for AccountSubSystem. Install this to add auth to any subsystem.

AccountSubSystem.Handlers

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 142 6/18/2026