Compare commits
5 Commits
b1075c8b82
...
53bfc4a413
| Author | SHA1 | Date | |
|---|---|---|---|
| 53bfc4a413 | |||
| 3de7e64f85 | |||
| 39a9181257 | |||
| 5d3f73bb13 | |||
| bc44de63ee |
@@ -13,6 +13,7 @@ namespace DigitalData.UserManager.API.Controllers;
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class AuthController : ControllerBase
|
public class AuthController : ControllerBase
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use MediatR")]
|
||||||
private readonly ILogger<UserController> _logger;
|
private readonly ILogger<UserController> _logger;
|
||||||
[Obsolete("Use MediatR")]
|
[Obsolete("Use MediatR")]
|
||||||
private readonly IUserService _userService;
|
private readonly IUserService _userService;
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
namespace DigitalData.UserManager.API.Controllers;
|
namespace DigitalData.UserManager.API.Controllers;
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
[Obsolete("Use MediatR")]
|
||||||
public class ModuleController : ReadControllerBaseWithErrorHandling<IModuleService, ModuleDto, Module, int>
|
public class ModuleController : ReadControllerBaseWithErrorHandling<IModuleService, ModuleDto, Module, int>
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use MediatR")]
|
||||||
public ModuleController(ILogger<ModuleController> logger, IModuleService service) : base(logger, service)
|
public ModuleController(ILogger<ModuleController> logger, IModuleService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ try {
|
|||||||
// Once the app is built, the password will be decrypted with Encryptor. lazy loading also acts as a call back method.
|
// Once the app is built, the password will be decrypted with Encryptor. lazy loading also acts as a call back method.
|
||||||
Lazy<string>? cnn_str = null;
|
Lazy<string>? cnn_str = null;
|
||||||
|
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
builder.Services.AddUserManager(options => options.UseSqlServer(cnn_str!.Value).EnableSensitiveDataLogging());
|
builder.Services.AddUserManager(options => options.UseSqlServer(cnn_str!.Value).EnableSensitiveDataLogging());
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
|
|
||||||
var allowedOrigins = builder.Configuration.GetSection("AllowedOrigins").Get<string[]>() ?? throw new InvalidOperationException("In appsettings there is no allowed origin.");
|
var allowedOrigins = builder.Configuration.GetSection("AllowedOrigins").Get<string[]>() ?? throw new InvalidOperationException("In appsettings there is no allowed origin.");
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace DigitalData.UserManager.Application
|
|||||||
/// <typeparam name="TDbContext">The type of the DbContext to use for the repositories.</typeparam>
|
/// <typeparam name="TDbContext">The type of the DbContext to use for the repositories.</typeparam>
|
||||||
/// <param name="services">The IServiceCollection to which the services will be added.</param>
|
/// <param name="services">The IServiceCollection to which the services will be added.</param>
|
||||||
/// <returns>The updated IServiceCollection.</returns>
|
/// <returns>The updated IServiceCollection.</returns>
|
||||||
|
[Obsolete("Use MediatR")]
|
||||||
public static IServiceCollection AddUserManagerApplication(this IServiceCollection services)
|
public static IServiceCollection AddUserManagerApplication(this IServiceCollection services)
|
||||||
=> services
|
=> services
|
||||||
.AddAutoMapper(typeof(UserMappingProfile).Assembly)
|
.AddAutoMapper(typeof(UserMappingProfile).Assembly)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public record GroupReadDto
|
public record GroupReadDto
|
||||||
(
|
(
|
||||||
int Id,
|
int Id,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using DigitalData.UserManager.Application.DTOs.User;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public record GroupOfUserReadDto(
|
public record GroupOfUserReadDto(
|
||||||
int Id,
|
int Id,
|
||||||
int UserId,
|
int UserId,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using DigitalData.UserManager.Application.DTOs.User;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public record UserRepReadDto(
|
public record UserRepReadDto(
|
||||||
int Id,
|
int Id,
|
||||||
int? UserId,
|
int? UserId,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace DigitalData.UserManager.Application.MappingProfiles
|
|||||||
{
|
{
|
||||||
public class GroupMappingProfile : Profile
|
public class GroupMappingProfile : Profile
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public GroupMappingProfile()
|
public GroupMappingProfile()
|
||||||
{
|
{
|
||||||
CreateMap<Group, GroupCreateDto>();
|
CreateMap<Group, GroupCreateDto>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace DigitalData.UserManager.Application.MappingProfiles
|
|||||||
{
|
{
|
||||||
public class GroupOfUserMappingProfile : Profile
|
public class GroupOfUserMappingProfile : Profile
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public GroupOfUserMappingProfile()
|
public GroupOfUserMappingProfile()
|
||||||
{
|
{
|
||||||
CreateMap<GroupOfUser, GroupOfUserCreateDto>();
|
CreateMap<GroupOfUser, GroupOfUserCreateDto>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace DigitalData.UserManager.Application.MappingProfiles
|
|||||||
{
|
{
|
||||||
public class UserRepMappingProfile : Profile
|
public class UserRepMappingProfile : Profile
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
public UserRepMappingProfile()
|
public UserRepMappingProfile()
|
||||||
{
|
{
|
||||||
CreateMap<UserRep, UserRepCreateDto>();
|
CreateMap<UserRep, UserRepCreateDto>();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace DigitalData.UserManager.DependencyInjection;
|
|||||||
|
|
||||||
public static class Extensions
|
public static class Extensions
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use IRepository")]
|
||||||
public static IServiceCollection AddUserManager<TDbContext>(this IServiceCollection services)
|
public static IServiceCollection AddUserManager<TDbContext>(this IServiceCollection services)
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,7 @@ public static class Extensions
|
|||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Use MediatR")]
|
||||||
public static IServiceCollection AddUserManager(this IServiceCollection services, Action<DbContextOptionsBuilder> optionsAction)
|
public static IServiceCollection AddUserManager(this IServiceCollection services, Action<DbContextOptionsBuilder> optionsAction)
|
||||||
{
|
{
|
||||||
services.AddUserManagerInfrastructure(optionsAction);
|
services.AddUserManagerInfrastructure(optionsAction);
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net7.0;net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>net462;net7.0;net8.0;net9.0</TargetFrameworks>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<PackageId>UserManager.Domain</PackageId>
|
<PackageId>UserManager.Domain</PackageId>
|
||||||
<Version>3.1.0</Version>
|
<Version>3.1.0</Version>
|
||||||
<Authors>Digital Data GmbH</Authors>
|
<Authors>Digital Data GmbH</Authors>
|
||||||
@@ -19,11 +17,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
|
||||||
|
<Nullable>disable</Nullable>
|
||||||
<ImplicitUsings>disable</ImplicitUsings>
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' != 'net462'">
|
<PropertyGroup Condition="'$(TargetFramework)' != 'net462'">
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -17,20 +17,18 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
[Column("ADDED_WHO")]
|
[Column("ADDED_WHO")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
AddedWho
|
AddedWho { get; set; }
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
[Column("CHANGED_WHO")]
|
[Column("CHANGED_WHO")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
ChangedWho
|
ChangedWho { get; set; }
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
//TODO: assign it to default value in create dto, not here!
|
//TODO: assign it to default value in create dto, not here!
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
|
|||||||
@@ -25,20 +25,18 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
|
|
||||||
[Column("COMMENT")]
|
[Column("COMMENT")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Comment
|
Comment { get; set; }
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
[Column("ADDED_WHO")]
|
[Column("ADDED_WHO")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
AddedWho
|
AddedWho { get; set; }
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
[DefaultValue("GETDATE()")]
|
[DefaultValue("GETDATE()")]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
{
|
{
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Name { get; set; }
|
Name { get; set; }
|
||||||
@@ -29,11 +29,10 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
|
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Comment
|
Comment { get; set; }
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
// TODO: this column should be assigned by triggers. despite this it is not null and this is problem for creation. talk with others
|
// TODO: this column should be assigned by triggers. despite this it is not null and this is problem for creation. talk with others
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -16,21 +16,21 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
|
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Comment { get; set; }
|
Comment { get; set; }
|
||||||
|
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public virtual User
|
public virtual User
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
User { get; set; }
|
User { get; set; }
|
||||||
|
|
||||||
[ForeignKey("GroupId")]
|
[ForeignKey("GroupId")]
|
||||||
public virtual Group
|
public virtual Group
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Group { get; set; }
|
Group { get; set; }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
|
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Name { get; set; }
|
Name { get; set; }
|
||||||
@@ -21,7 +21,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[StringLength(20)]
|
[StringLength(20)]
|
||||||
[Column("SHORT_NAME")]
|
[Column("SHORT_NAME")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
ShortName { get; set; }
|
ShortName { get; set; }
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("COMMENT")]
|
[Column("COMMENT")]
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Comment { get; set; }
|
Comment { get; set; }
|
||||||
@@ -30,7 +30,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("ADDED_WHO")]
|
[Column("ADDED_WHO")]
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
AddedWho { get; set; } = "DEFAULT";
|
AddedWho { get; set; } = "DEFAULT";
|
||||||
@@ -38,21 +38,21 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("CHANGED_WHO")]
|
[Column("CHANGED_WHO")]
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
ChangedWho { get; set; }
|
ChangedWho { get; set; }
|
||||||
|
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public virtual User
|
public virtual User
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
User { get; set; }
|
User { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ModuleId")]
|
[ForeignKey("ModuleId")]
|
||||||
public virtual Module
|
public virtual Module
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Module { get; set; }
|
Module { get; set; }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("PRENAME")]
|
[Column("PRENAME")]
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Prename { get; set; }
|
Prename { get; set; }
|
||||||
@@ -18,7 +18,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("NAME")]
|
[Column("NAME")]
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Name { get; set; }
|
Name { get; set; }
|
||||||
@@ -26,12 +26,16 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Required]
|
[Required]
|
||||||
[Column("USERNAME")]
|
[Column("USERNAME")]
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
public string Username { get; set; }
|
public
|
||||||
|
#if NET7_0_OR_GREATER
|
||||||
|
required
|
||||||
|
#endif
|
||||||
|
string Username { get; set; }
|
||||||
|
|
||||||
[Column("SHORTNAME")]
|
[Column("SHORTNAME")]
|
||||||
[StringLength(30)]
|
[StringLength(30)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Shortname
|
Shortname
|
||||||
@@ -40,7 +44,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("EMAIL")]
|
[Column("EMAIL")]
|
||||||
[StringLength(100)]
|
[StringLength(100)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Email { get; set; }
|
Email { get; set; }
|
||||||
@@ -50,7 +54,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[StringLength(5)]
|
[StringLength(5)]
|
||||||
[DefaultValue("de-DE")]
|
[DefaultValue("de-DE")]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Language { get; set; }
|
Language { get; set; }
|
||||||
@@ -58,7 +62,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("COMMENT")]
|
[Column("COMMENT")]
|
||||||
[StringLength(500)]
|
[StringLength(500)]
|
||||||
public string
|
public string
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Comment { get; set; }
|
Comment { get; set; }
|
||||||
@@ -70,7 +74,11 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
[Column("DATE_FORMAT")]
|
[Column("DATE_FORMAT")]
|
||||||
[StringLength(10)]
|
[StringLength(10)]
|
||||||
[DefaultValue("dd.MM.yyyy")]
|
[DefaultValue("dd.MM.yyyy")]
|
||||||
public string DateFormat { get; set; }
|
public
|
||||||
|
#if NET7_0_OR_GREATER
|
||||||
|
required
|
||||||
|
#endif
|
||||||
|
string DateFormat { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ACTIVE")]
|
[Column("ACTIVE")]
|
||||||
|
|||||||
@@ -28,28 +28,28 @@ namespace DigitalData.UserManager.Domain.Entities
|
|||||||
|
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public virtual User
|
public virtual User
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
User { get; set; }
|
User { get; set; }
|
||||||
|
|
||||||
[ForeignKey("RepGroupId")]
|
[ForeignKey("RepGroupId")]
|
||||||
public virtual Group
|
public virtual Group
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
RepGroup { get; set; }
|
RepGroup { get; set; }
|
||||||
|
|
||||||
[ForeignKey("GroupId")]
|
[ForeignKey("GroupId")]
|
||||||
public virtual Group
|
public virtual Group
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
Group { get; set; }
|
Group { get; set; }
|
||||||
|
|
||||||
[ForeignKey("RepUserId")]
|
[ForeignKey("RepUserId")]
|
||||||
public virtual User
|
public virtual User
|
||||||
#if NET6_0_OR_GREATER
|
#if NET7_0_OR_GREATER
|
||||||
?
|
?
|
||||||
#endif
|
#endif
|
||||||
RepUser { get; set; }
|
RepUser { get; set; }
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using DigitalData.UserManager.Application;
|
using DigitalData.UserManager.Application.Contracts.Repositories;
|
||||||
using DigitalData.UserManager.Application.Contracts.Repositories;
|
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||||
using DigitalData.UserManager.Infrastructure.Repositories;
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -16,6 +15,7 @@ public static class DependencyInjection
|
|||||||
/// <typeparam name="TDbContext">The type of the DbContext to use for the repositories.</typeparam>
|
/// <typeparam name="TDbContext">The type of the DbContext to use for the repositories.</typeparam>
|
||||||
/// <param name="services">The IServiceCollection to which the services will be added.</param>
|
/// <param name="services">The IServiceCollection to which the services will be added.</param>
|
||||||
/// <returns>The updated IServiceCollection.</returns>
|
/// <returns>The updated IServiceCollection.</returns>
|
||||||
|
[Obsolete("Use IRepository")]
|
||||||
public static IServiceCollection AddUserManagerInfrastructure<TDbContext>(this IServiceCollection services)
|
public static IServiceCollection AddUserManagerInfrastructure<TDbContext>(this IServiceCollection services)
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
@@ -36,6 +36,7 @@ public static class DependencyInjection
|
|||||||
/// <param name="services">The <see cref="IServiceCollection"/> to which the services will be added.</param>
|
/// <param name="services">The <see cref="IServiceCollection"/> to which the services will be added.</param>
|
||||||
/// <param name="optionsAction">An <see cref="Action{T}"/> to configure the <see cref="DbContextOptionsBuilder"/>.</param>
|
/// <param name="optionsAction">An <see cref="Action{T}"/> to configure the <see cref="DbContextOptionsBuilder"/>.</param>
|
||||||
/// <returns>The updated <see cref="IServiceCollection"/>.</returns>
|
/// <returns>The updated <see cref="IServiceCollection"/>.</returns>
|
||||||
|
[Obsolete("Use IRepository")]
|
||||||
public static IServiceCollection AddUserManagerInfrastructure(this IServiceCollection services, Action<DbContextOptionsBuilder> optionsAction) => services
|
public static IServiceCollection AddUserManagerInfrastructure(this IServiceCollection services, Action<DbContextOptionsBuilder> optionsAction) => services
|
||||||
.AddDbContext<UserManagerDbContext>(optionsAction)
|
.AddDbContext<UserManagerDbContext>(optionsAction)
|
||||||
.AddUserManagerInfrastructure<UserManagerDbContext>();
|
.AddUserManagerInfrastructure<UserManagerDbContext>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using DigitalData.UserManager.Infrastructure.Contracts;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class ClientUserRepository<TDbContext> : CRUDRepository<ClientUser, int, TDbContext>, IClientUserRepository
|
public class ClientUserRepository<TDbContext> : CRUDRepository<ClientUser, int, TDbContext>, IClientUserRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using DigitalData.UserManager.Application.Contracts.Repositories;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class GroupOfUserRepository<TDbContext> : CRUDRepository<GroupOfUser, int, TDbContext>, IGroupOfUserRepository
|
public class GroupOfUserRepository<TDbContext> : CRUDRepository<GroupOfUser, int, TDbContext>, IGroupOfUserRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class GroupRepository<TDbContext> : CRUDRepository<Group, int, TDbContext>, IGroupRepository
|
public class GroupRepository<TDbContext> : CRUDRepository<Group, int, TDbContext>, IGroupRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class ModuleOfUserRepository<TDbContext> : CRUDRepository<ModuleOfUser, int, TDbContext>, IModuleOfUserRepository
|
public class ModuleOfUserRepository<TDbContext> : CRUDRepository<ModuleOfUser, int, TDbContext>, IModuleOfUserRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class ModuleRepository<TDbContext> : CRUDRepository<Module, int, TDbContext>, IModuleRepository
|
public class ModuleRepository<TDbContext> : CRUDRepository<Module, int, TDbContext>, IModuleRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
namespace DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class UserRepRepository<TDbContext> : CRUDRepository<UserRep, int, TDbContext>, IUserRepRepository
|
public class UserRepRepository<TDbContext> : CRUDRepository<UserRep, int, TDbContext>, IUserRepRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use Repository")]
|
||||||
public class UserRepository<TDbContext> : CRUDRepository<User, int, TDbContext>, IUserRepository
|
public class UserRepository<TDbContext> : CRUDRepository<User, int, TDbContext>, IUserRepository
|
||||||
where TDbContext : DbContext, IUserManagerDbContext
|
where TDbContext : DbContext, IUserManagerDbContext
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user