feat(core): Core-Bibliotheken auf 2.0.0.0 aktualisiert und IUnique implementiert
- `IUnique`-Schnittstelle in allen Entitäten implementiert. - Interface für DbContext erstellt und DbSet-Eigenschaften in den Konstruktoren über Repositories injiziert.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary fs-5">
|
||||
<div class="container-fluid">
|
||||
<!-- DD Logo -->
|
||||
<a class="light-stroke ms-5" href="https://digitaldata.works/">
|
||||
<a class="logo" href="https://digitaldata.works/">
|
||||
<img fetchpriority="high" width="200vw"
|
||||
[src]="(isDarkTheme)?'../../assets/img/DD_white.svg':'../../assets/img/digital_data.svg'">
|
||||
</a>
|
||||
|
||||
@@ -15,7 +15,6 @@ import { TransferService } from '../../services/button/transfer.service';
|
||||
import { MatBadgeModule } from '@angular/material/badge';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.14" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.16" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
|
||||
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Assets\icon.png">
|
||||
<Pack>True</Pack>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DigitalData.UserManager.Domain.Entities
|
||||
{
|
||||
public class BaseEntity
|
||||
public class BaseEntity : IUnique<int>
|
||||
{
|
||||
[Column("GUID")]
|
||||
[Key]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DigitalData.UserManager.Domain.Entities
|
||||
{
|
||||
[Table("TBDD_MODULES", Schema = "dbo")]
|
||||
public class Module
|
||||
public class Module : IUnique<int>
|
||||
{
|
||||
[Column("GUID")]
|
||||
[Key]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DigitalData.UserManager.Domain.Entities
|
||||
{
|
||||
[Table("TBDD_USER_MODULES", Schema = "dbo")]
|
||||
public class ModuleOfUser
|
||||
public class ModuleOfUser : IUnique<int>
|
||||
{
|
||||
[Column("GUID")]
|
||||
[Key]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DigitalData.UserManager.Infrastructure.Contracts
|
||||
{
|
||||
public interface IUserManagerDbContext
|
||||
{
|
||||
public DbSet<GroupOfUser> GroupOfUsers { get; }
|
||||
|
||||
public DbSet<Group> Groups { get; }
|
||||
|
||||
public DbSet<ModuleOfUser> ModuleOfUsers { get; }
|
||||
|
||||
public DbSet<Module> Modules { get; }
|
||||
|
||||
public DbSet<User> Users { get; }
|
||||
|
||||
public DbSet<UserRep> UserReps { get; }
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class GroupOfUserRepository<TDbContext> : CRUDRepository<GroupOfUser, int, TDbContext>, IGroupOfUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public GroupOfUserRepository(TDbContext dbContext) : base(dbContext)
|
||||
public GroupOfUserRepository(TDbContext dbContext) : base(dbContext, dbContext.GroupOfUsers)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class GroupRepository<TDbContext> : CRUDRepository<Group, int, TDbContext>, IGroupRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public GroupRepository(TDbContext dbContext) : base(dbContext)
|
||||
public GroupRepository(TDbContext dbContext) : base(dbContext, dbContext.Groups)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class ModuleOfUserRepository<TDbContext> : CRUDRepository<ModuleOfUser, int, TDbContext>, IModuleOfUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public ModuleOfUserRepository(TDbContext dbContext) : base(dbContext)
|
||||
public ModuleOfUserRepository(TDbContext dbContext) : base(dbContext, dbContext.ModuleOfUsers)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class ModuleRepository<TDbContext> : CRUDRepository<Module, int, TDbContext>, IModuleRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public ModuleRepository(TDbContext dbContext) : base(dbContext)
|
||||
public ModuleRepository(TDbContext dbContext) : base(dbContext, dbContext.Modules)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserRepRepository<TDbContext> : CRUDRepository<UserRep, int, TDbContext>, IUserRepRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public UserRepRepository(TDbContext dbContext) : base(dbContext)
|
||||
public UserRepRepository(TDbContext dbContext) : base(dbContext, dbContext.UserReps)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserRepository<TDbContext> : CRUDRepository<User, int, TDbContext>, IUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
private IModuleOfUserRepository _moduleOfUserRepo;
|
||||
private IGroupOfUserRepository _groupOfUserRepo;
|
||||
public UserRepository(TDbContext dbContext, IModuleOfUserRepository moduleOfUserRepo, IGroupOfUserRepository groupOfUserRepo) : base(dbContext)
|
||||
public UserRepository(TDbContext dbContext, IModuleOfUserRepository moduleOfUserRepo, IGroupOfUserRepository groupOfUserRepo) : base(dbContext, dbContext.Users)
|
||||
{
|
||||
_moduleOfUserRepo = moduleOfUserRepo;
|
||||
_groupOfUserRepo = groupOfUserRepo;
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserManagerDbContext : DbContext
|
||||
public class UserManagerDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public DbSet<GroupOfUser> GroupOfUsers { get; set; }
|
||||
|
||||
public DbSet<Group> Groups { get; set; }
|
||||
|
||||
public DbSet<ModuleOfUser> ModuleOfUsers { get; set; }
|
||||
|
||||
public DbSet<Module> Modules { get; set; }
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
|
||||
public DbSet<UserRep> UserReps { get; set; }
|
||||
|
||||
public UserManagerDbContext(DbContextOptions<UserManagerDbContext> options) : base(options)
|
||||
{
|
||||
GroupOfUsers = Set<GroupOfUser>();
|
||||
Groups = Set<Group>();
|
||||
ModuleOfUsers = Set<ModuleOfUser>();
|
||||
Modules = Set<Module>();
|
||||
Users = Set<User>();
|
||||
UserReps = Set<UserRep>();
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
||||
Reference in New Issue
Block a user