Mango.Nop.Plugins/Nop.Plugin.Misc.AuctionPlugin/Domains/DataLayer/ProductToAuctionDbTable.cs

20 lines
842 B
C#

using Mango.Nop.Core.Repositories;
using Nop.Core.Caching;
using Nop.Core.Configuration;
using Nop.Core.Events;
using Nop.Data;
using Nop.Plugin.Misc.AuctionPlugin.Domains.Entities;
namespace Nop.Plugin.Misc.AuctionPlugin.Domains.DataLayer;
public class ProductToAuctionDbTable: MgDbTableBase<ProductToAuctionMapping>
{
public ProductToAuctionDbTable(IEventPublisher eventPublisher, INopDataProvider dataProvider, IShortTermCacheManager shortTermCacheManager, IStaticCacheManager staticCacheManager, AppSettings appSettings) : base(eventPublisher, dataProvider, shortTermCacheManager, staticCacheManager, appSettings)
{
}
public IQueryable<ProductToAuctionMapping> GetByAuctionAndProductId(int auctionId, int productId)
{
return Table.Where(x => x.AuctionId == auctionId && x.ProductId == productId);
}
}