public ProductModel Create(ProductModel newProductModel)
 {
     _ctx.ProductModels.Attach(newProductModel).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProductModel);
 }
 public Order Create(Order newOrder)
 {
     _ctx.Orders.Attach(newOrder).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newOrder);
 }
예제 #3
0
 public Country Create(Country newCountry)
 {
     _ctx.Countries.Attach(newCountry).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newCountry);
 }
 public ProductSize Create(ProductSize newProductSize)
 {
     _ctx.ProductSizes.Attach(newProductSize).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProductSize);
 }
예제 #5
0
 public Product Create(Product newProduct)
 {
     _ctx.Products.Attach(newProduct).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProduct);
 }
 public ProductStock Create(ProductStock newProductStock)
 {
     _ctx.ProductStocks.Attach(newProductStock).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProductStock);
 }
 public ProductCategory Create(ProductCategory newProductCategory)
 {
     _ctx.ProductCategories.Attach(newProductCategory).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProductCategory);
 }
예제 #8
0
 public ProductMetric Create(ProductMetric newProductMetric)
 {
     _ctx.ProductMetrics.Attach(newProductMetric).State = EntityState.Added;
     _ctx.SaveChanges();
     return(newProductMetric);
 }