29 lines
761 B
C#
29 lines
761 B
C#
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace EgwCoreLib.Lux.Data.Repository.Sales
|
|
{
|
|
public class CustomerRepository : BaseRepository, ICustomerRepository
|
|
{
|
|
#region Public Constructors
|
|
|
|
public CustomerRepository(IDbContextFactory<DataLayerContext> ctxFactory) : base(ctxFactory)
|
|
{
|
|
}
|
|
|
|
#endregion Public Constructors
|
|
|
|
#region Public Methods
|
|
|
|
public async Task<List<CustomerModel>> GetAllAsync()
|
|
{
|
|
await using var dbCtx = await CreateContextAsync();
|
|
return await dbCtx.DbSetCustomer
|
|
.AsNoTracking()
|
|
.ToListAsync();
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
}
|