using Fake.DependencyInjection; using Oms.Domain.SystemAggregate.Entities; using Oms.Domain.SystemAggregate.Repositories; using Oms.SqlSugarCore.Repositories; namespace Oms.SqlSugarCore.System; public class CountryRepository : OmsSqlSugarRepository, ICountryRepository, IScopedDependency { public Task GetByCountryCodeAsync(string countryCode, CancellationToken cancellationToken = default) { return FirstOrDefaultAsync(x => x.CountryCode == countryCode, cancellationToken); } public async Task GetByCountryCodeIncludingDeletedAsync( string countryCode, CancellationToken cancellationToken = default) { var db = await GetDbContextAsync(cancellationToken); return await SoftDeleteQuery.FirstIncludingDeletedAsync( db, x => x.CountryCode == countryCode, cancellationToken); } }