Deprecate methods and classes in UserManager.Application
Introduce `[Obsolete]` attributes to various methods and classes, suggesting alternatives such as MediatR and IRepository. Mark multiple DTOs and repository classes as obsolete, recommending the use of DigitalData.Core.Exceptions and .Middleware or Repository. This change aims to enhance maintainability and clarity in the codebase.
This commit is contained in:
parent
5d3f73bb13
commit
39a9181257
@ -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,
|
||||||
|
|||||||
@ -16,6 +16,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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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 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
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user