/// <summary> /// should find better way to get latest auto number /// or consider find latest auto number from UI /// </summary> /// <param name="c"></param> public void Handle(CreateAutoNumberTest c) { //todo: should find better way to get latest auto number //or consider find latest auto number from UI var lastestId = 0; using (var db = new TestDbContext()) { lastestId = db.AutoNumberTests.Select(i => i.Id).OrderByDescending(i => i).FirstOrDefault(); } var id = lastestId + 1; _repository.CreateNew(new DomainAutoNumberTest(id, c.Name)); }
public void Handle(CreateCheckin c) { _repository.CreateNew(new Checkin(c.CheckinId, c.StartDate, c.Duration, c.CreatedBy)); }
public void Handle(CreateNews c) { _repo.CreateNew(new DomainNews(c.Id, c.Title, c.ShortDesciption, c.Description, c.UrlImage, c.AllowComment, c.LanguageId, c.ParentId)); }
public void Handle(CreateVoucherCode c) { _repo.CreateNew(new DomainVoucherCode(c.Id, c.Code, c.Value, c.VoucherMethodId)); }
public void Handle(CreateProduct c) { _repo.CreateNew(new DomainProduct(c.Id, c.ProductCode, c.AllowComment, c.Price, c.Gram, c.Calorie, c.Quantity, c.Title, c.UrlImage, c.ShortDesciption, c.Description, c.LanguageId, c.ParentId)); }
public void Handle(CreateProductPromotion c) { _repo.CreateNew(new DomainProductPromotion(c.Id, c.ProductQuantity, c.DiscountValue, c.Description , EngineeCurrentContext.SystemMinDate, EngineeCurrentContext.SystemMinDate, c.LanguageId)); }
public void Handle(CreatePaymentTransaction c) { _repo.CreateNew(new DomainPaymentTransaction(c.Id, c.PaymentMethodId, c.OrderCode, c.Amount, c.IpAddress, c.LanguageId, c.SiteDomainUrl)); }
public void Handle(CreateShoppingCart c) { _repository.CreateNew(new ShoppingCart(c.ShoppingCartId)); }
public void Handle(CreateCategory c) { _repo.CreateNew(new DomainCategory(c.Id, c.IsSinglePage, c.ShowInFrontEnd, c.Title , c.SeoKeywords, c.SeoDescription, c.SeoUrlFriendly , c.CategoryViewName, c.IconUrl, c.Description, c.LanguageId, c.ParentId, c.Type)); }
public void Handle(CreateUser c) { _repo.CreateNew(new DomainUser(c.Id, c.Username, c.Password, c.Phone, c.Email, c.WebsiteUrl)); }
public void Handle(CreateOrderPromotion c) { _repo.CreateNew(new DomainOrderPromotion(c.Id, c.LanguageId, c.Description, c.AmountToDiscount, c.DiscountAmount, c.FreeShip)); }
public void Handle(CreateShoppingCart c) { _repo.CreateNew(new DomainShoppingCart(c.Id, c.UserId, c.LanguageId, c.IpAddress, c.SiteDomainUrl)); }