- Marked `IEnvelopeReceiverRepository` and several repository classes as obsolete, recommending the use of `IRepository`. - Corrected `using` directive in `IReceiverService.cs`. - Removed `UpdateAsync` method from `IReceiverService`. - Enhanced `ISmsSender` interface with new properties and methods. - Updated `ReceiverCreateDto`, `ReceiverReadDto`, and `UserReceiverDto` to enforce non-nullable properties. - Refactored `TestReceiverController` to suggest using `MediatR`.
20 lines
632 B
C#
20 lines
632 B
C#
using DigitalData.Core.Infrastructure;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
using EnvelopeGenerator.Application.Contracts.Repositories;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace EnvelopeGenerator.Infrastructure.Repositories;
|
|
|
|
[Obsolete("Use IRepository")]
|
|
public class ConfigRepository : CRUDRepository<Config, int, EGDbContext>, IConfigRepository
|
|
{
|
|
public ConfigRepository(EGDbContext dbContext) : base(dbContext, dbContext.Configs)
|
|
{
|
|
}
|
|
|
|
public async Task<Config?> ReadFirstAsync()
|
|
{
|
|
var configs = await _dbSet.ToListAsync();
|
|
return configs.Count > 0 ? configs[0] : default;
|
|
}
|
|
} |