using System.Transactions;
using Mango.Nop.Core.Repositories;
using Nop.Core;
using Nop.Core.Caching;
using Nop.Core.Configuration;
using Nop.Core.Domain.Catalog;
using Nop.Core.Events;
using Nop.Data;
using Nop.Data.DataProviders;
using Nop.Plugin.Misc.AuctionPlugin.Domains.Entities;

namespace Nop.Plugin.Misc.AuctionPlugin.Domains.DataLayer;

public class AuctionMgDal : MgDalBase<MgDbContextBase>
{
    public IRepository<Auction> Auctions { get; set; }

    //public AuctionMgDal(IEventPublisher eventPublisher, INopDataProvider dataProvider, IShortTermCacheManager shortTermCacheManager, IStaticCacheManager staticCacheManager, AppSettings appSettings) 
    //    : base(eventPublisher, dataProvider, shortTermCacheManager, staticCacheManager, appSettings)
    //{
    //}

    public async Task AddProductToAuction(Product product, Auction auction)
    {
        //using var dataContext = ((MsSqlNopDataProvider)_dataProvider).
        //dataProvider.GetTable<TEntity>().wh

        //using var transaction = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);
        //await _dataProvider.InsertEntityAsync()
        //    InsertEntityAsync(product);
        //transaction.Complete();
    }
}