Exemple #1
0
        public async Task <Volume> UpdateAsync(Volume volume)
        {
            using (var dbContext = new Upstart13beerappContext())
            {
                dbContext.Attach(volume);
                dbContext.Entry(volume).State = EntityState.Modified;
                await dbContext.SaveChangesAsync();

                return(volume);
            }
        }
Exemple #2
0
        public async Task <FoodPairing> UpdateAsync(FoodPairing foodPairing)
        {
            using (var dbContext = new Upstart13beerappContext())
            {
                dbContext.Attach(foodPairing);
                dbContext.Entry(foodPairing).State = EntityState.Modified;
                await dbContext.SaveChangesAsync();

                return(foodPairing);
            }
        }
Exemple #3
0
        public async Task <Ingredient> UpdateAsync(Ingredient ingredient)
        {
            using (var dbContext = new Upstart13beerappContext())
            {
                dbContext.Attach(ingredient);
                dbContext.Entry(ingredient).State = EntityState.Modified;
                await dbContext.SaveChangesAsync();

                return(ingredient);
            }
        }
Exemple #4
0
        public async Task <Method> UpdateAsync(Method method)
        {
            using (var dbContext = new Upstart13beerappContext())
            {
                dbContext.Attach(method);
                dbContext.Entry(method).State = EntityState.Modified;
                await dbContext.SaveChangesAsync();

                return(method);
            }
        }
Exemple #5
0
        public async Task <Beer> UpdateAsync(Beer beer)
        {
            using (var dbContext = new Upstart13beerappContext())
            {
                dbContext.Attach(beer);
                dbContext.Entry(beer).State = EntityState.Modified;
                await dbContext.SaveChangesAsync();

                return(beer);
            }
        }