예제 #1
0
        public async Task UpdateBalcony(Balcony balcony)
        {
            var balconyToUpdate = Balconies.FirstOrDefault(x => x.Symbol == balcony.Symbol);

            balconyToUpdate.QuantityInStock = balcony.QuantityInStock;
            balconyToUpdate.Price           = balcony.Price;
            balconyToUpdate.Name            = balcony.Name;

            context.Balcony.Update(balconyToUpdate);
            await context.SaveChangesAsync();
        }
예제 #2
0
 public async Task UpdateBalcony(Balcony balcony)
 {
     context.Balcony.Update(balcony);
     await context.SaveChangesAsync();
 }
예제 #3
0
 public async Task CreateBalcony(Balcony balcony)
 {
     context.Balcony.Add(balcony);
     await context.SaveChangesAsync();
 }