public Beer AddBeer(Beer beer) { ctx.Attach(beer).State = EntityState.Added; ctx.SaveChanges(); return(beer); }
public Order AddOrder(Order order) { ctx.Attach(order).State = EntityState.Added; ctx.SaveChanges(); return(ReadOrderByID(order.ID)); }
public BeerType AddType(BeerType type) { ctx.Attach(type).State = EntityState.Added; ctx.SaveChanges(); return(type); }
public Brand AddBrand(Brand brand) { ctx.Attach(brand).State = EntityState.Added; ctx.SaveChanges(); return(brand); }
public Customer AddCustomer(Customer customer) { ctx.Attach(customer).State = EntityState.Added; ctx.SaveChanges(); return(customer); }
public User AddUser(User user) { ctx.Attach(user).State = EntityState.Added; ctx.SaveChanges(); return(user); }