Deprecate services and update mapping profiles
- Added obsolete attributes to `AuthController`, `ModuleController`, and various mapping profiles, recommending the use of MediatR and DigitalData.Core.Exceptions. - Updated `User` class to use `required` keyword for `DateFormat` in .NET 7.0 or greater. - Marked methods in `Extensions` and `AddUserManagerInfrastructure` as obsolete, suggesting the use of IRepository. - Adjusted import statements in `DependencyInjection.cs` and marked `GroupOfUserRepository` and `ModuleRepository` as obsolete, recommending a Repository pattern.
This commit is contained in:
@@ -8,6 +8,7 @@ namespace DigitalData.UserManager.DependencyInjection;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
[Obsolete("Use IRepository")]
|
||||
public static IServiceCollection AddUserManager<TDbContext>(this IServiceCollection services)
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
@@ -16,10 +17,11 @@ public static class Extensions
|
||||
return services;
|
||||
}
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public static IServiceCollection AddUserManager(this IServiceCollection services, Action<DbContextOptionsBuilder> optionsAction)
|
||||
{
|
||||
services.AddUserManagerInfrastructure(optionsAction);
|
||||
services.AddUserManagerApplication();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user