[ADD] Added EF Core project for authority db

This commit is contained in:
max
2025-01-27 23:15:23 +01:00
parent c27890a31f
commit e914023c5a
6 changed files with 64 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
using DotBased.AspNet.Authority.Models.Authority;
using Microsoft.EntityFrameworkCore;
namespace DotBased.AspNet.Authority.EFCore;
public class AuthorityContext : DbContext
{
public DbSet<AuthorityAttribute> Attributes { get; set; }
public DbSet<AuthorityGroup> Groups { get; set; }
public DbSet<AuthorityRole> Roles { get; set; }
public DbSet<AuthorityUser> Users { get; set; }
}

View File

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\DotBased.AspNet.Authority\DotBased.AspNet.Authority.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
using DotBased.AspNet.Authority.Models.Authority;
using DotBased.AspNet.Authority.Repositories;
namespace DotBased.AspNet.Authority.EFCore.Repositories;
public class RoleRepository : IRoleRepository
{
public Task<ListResult<AuthorityRole>> GetRolesAsync(int limit = 20, int offset = 0, string search = "", CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
}