28 lines
848 B
C#
28 lines
848 B
C#
using FruitBank.Common.Entities;
|
|
using LinqToDB;
|
|
using Mango.Nop.Core.Loggers;
|
|
using Mango.Nop.Data.Repositories;
|
|
using Nop.Core.Caching;
|
|
using Nop.Core.Configuration;
|
|
using Nop.Core.Events;
|
|
using Nop.Data;
|
|
|
|
|
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Domains.DataLayer;
|
|
|
|
public class CustomerCreditDbTable : MgDbTableBase<CustomerCredit>
|
|
{
|
|
public CustomerCreditDbTable(
|
|
IEventPublisher eventPublisher,
|
|
INopDataProvider dataProvider,
|
|
IShortTermCacheManager shortTermCacheManager,
|
|
IStaticCacheManager staticCacheManager,
|
|
AppSettings appSettings)
|
|
: base(eventPublisher, dataProvider, shortTermCacheManager, staticCacheManager, appSettings)
|
|
{
|
|
}
|
|
|
|
public Task<CustomerCredit?> GetByCustomerIdAsync(int customerId)
|
|
=> GetAll().FirstOrDefaultAsync(x => x.CustomerId == customerId);
|
|
}
|