예제 #1
0
        public Beer AddBeer(Beer beer)
        {
            ctx.Attach(beer).State = EntityState.Added;
            ctx.SaveChanges();

            return(beer);
        }
예제 #2
0
        public Order AddOrder(Order order)
        {
            ctx.Attach(order).State = EntityState.Added;
            ctx.SaveChanges();

            return(ReadOrderByID(order.ID));
        }
예제 #3
0
        public BeerType AddType(BeerType type)
        {
            ctx.Attach(type).State = EntityState.Added;
            ctx.SaveChanges();

            return(type);
        }
예제 #4
0
        public Brand AddBrand(Brand brand)
        {
            ctx.Attach(brand).State = EntityState.Added;
            ctx.SaveChanges();

            return(brand);
        }
예제 #5
0
 public Customer AddCustomer(Customer customer)
 {
     ctx.Attach(customer).State = EntityState.Added;
     ctx.SaveChanges();
     return(customer);
 }
예제 #6
0
 public User AddUser(User user)
 {
     ctx.Attach(user).State = EntityState.Added;
     ctx.SaveChanges();
     return(user);
 }