public DiscountService(Db _db = null, bool nocache = false) { _Context = new DBContextService(_db); if (nocache) { _UseCache = false; } // this._init(); }
public static OrderNote OnCreated(OrderNote item) { //send email to client var dbcontext = new DBContextService(); var messageService = new MessageService(dbcontext.EntityContext); var orderId = item.OrderID; var order = dbcontext.EntityContext.Orders.AsNoTracking().FirstOrDefault(x => x.ID == orderId); if (order != null) { var shop = LS.Get <Shop>().FirstOrDefault(x => x.ID == order.ShopID); messageService.SendNewOrderNoteEmailToUser(item, order, shop); } return(item); }
public MessageService(Db _db = null, bool isGetTokensOnly = false) { _Context = new DBContextService(_db); _isGetTokensOnly = isGetTokensOnly; }