Suppress warnings for obsolete members and update repo

Added warning suppression in `Program.cs` for obsolete user manager configuration. Marked `ClientUserRepository` as obsolete to encourage transition to the new `Repository` class.
This commit is contained in:
tekh 2025-06-26 13:56:42 +02:00
parent 3de7e64f85
commit 53bfc4a413
2 changed files with 3 additions and 0 deletions

View File

@ -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.
Lazy<string>? cnn_str = null;
#pragma warning disable CS0618 // Type or member is obsolete
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.");

View File

@ -6,6 +6,7 @@ using DigitalData.UserManager.Infrastructure.Contracts;
namespace DigitalData.UserManager.Infrastructure.Repositories
{
[Obsolete("Use Repository")]
public class ClientUserRepository<TDbContext> : CRUDRepository<ClientUser, int, TDbContext>, IClientUserRepository
where TDbContext : DbContext, IUserManagerDbContext
{