public virtual void Create(IPaymentServicesContext context, Service baseEntity) { name = baseEntity.Name; price = baseEntity.Price; dbContext = context; }
public override void Create(IPaymentServicesContext context, Service baseEntity) { base.Create(context, baseEntity); IActiveService activeService; if (!Exists(out activeService)) { var promotionEntity = new SpecialOffer() { PlaceId = objectId, Placement = placement, ExpiriationTime = DateTime.MinValue, HandlerName = baseEntity.HandlerName }; dbContext.SpecialOffers.Add(promotionEntity); dbContext.SaveChanges(); activeEntity = promotionEntity; return; } Init(context, baseEntity, activeService); }
public override void Create(IPaymentServicesContext context, Service baseEntity) { base.Create(context, baseEntity); IActiveService activeService; if (!Exists(out activeService)) { var subscriptionEntity = new Subscription() { ExpiriationTime = DateTime.MinValue, UserId = userId, HandlerName = baseEntity.HandlerName }; context.Subscriptions.Add(subscriptionEntity); context.SaveChanges(); activeEntity = subscriptionEntity; return; } Init(context, baseEntity, activeService); }
public virtual void Init(IPaymentServicesContext context, Service baseEntity, IActiveService activeServiceEntity) { name = baseEntity.Name; price = baseEntity.Price; dbContext = context; activeEntity = (TEntity)activeServiceEntity; }
public ServiceBuilder(IPaymentServicesContext dbContext) { _dbContext = dbContext; }
public PaymentServices(IPaymentServicesContext paymentContext, IServiceFactory serviceFactory) { _dbContext = paymentContext; _serviceFactory = serviceFactory; }
public ServiceFactory(IPaymentServicesContext paymentDbContext, IBuilder <IService> serviceBuilder) { _dbContext = paymentDbContext; _serviceBuilder = serviceBuilder; }
public override void Init(IPaymentServicesContext context, Service baseEntity, IActiveService activeServiceEntity) { base.Init(context, baseEntity, activeServiceEntity); objectId = activeEntity.PlaceId; }
public override void Init(IPaymentServicesContext context, Service baseEntity, IActiveService activeServiceEntity) { base.Init(context, baseEntity, activeServiceEntity); userId = activeEntity.UserId; }