public Product CreateProduct(Product product) { _ctx.Attach(product).State = EntityState.Added; _ctx.SaveChanges(); return(product); }
public Order CreateOrder(Order order) { _ctx.Attach(order).State = EntityState.Added; _ctx.SaveChanges(); return(order); }