internal TResult Perform <TResult>( IPerformableAction <TResult> action, bool transactional = true) { if (transactional) { using (IBillingContext context = BillingContext.Create()) { using (var transaction = TransactionUtils.CreateTransaction()) { action.DbContext = context; TResult result = action.Perform(); transaction.Complete(); return(result); } } } else { using (IBillingContext context = BillingContext.Create()) { action.DbContext = context; return(action.Perform()); } } }
internal void Perform( IPerformableAction action, bool transactional = true) { if (transactional) { using (IBillingContext context = BillingContext.Create()) { using (var transaction = TransactionUtils.CreateTransaction()) { action.DbContext = context; action.Perform(); transaction.Complete(); } } } else { using (IBillingContext context = BillingContext.Create()) { action.DbContext = context; action.Perform(); } } }
public BillingRepository(IBillingContext context) { Context = context; }
public ShopController(IProductContext productContext, IReviewContext reviewContext, IOrderContext orderContext, IBillingContext billingContext) { productLogic = new ProductLogic(productContext); reviewLogic = new ReviewLogic(reviewContext); orderLogic = new OrderLogic(orderContext); billingLogic = new BillingLogic(billingContext); }
public BillingLogic(IBillingContext context) { BillingRepository = new BillingRepository(context); }
public BillingManager(IBillingContext context) : base(context) { }
protected BaseManager(IBillingContext context) { this.Context = context; }