[ADD] Added EF Core project for authority db
This commit is contained in:
12
DotBased.AspNet.Authority.EFCore/AuthorityContext.cs
Normal file
12
DotBased.AspNet.Authority.EFCore/AuthorityContext.cs
Normal 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; }
|
||||
}
|
@@ -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>
|
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user