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(); }
public async Task UpdateBalcony(Balcony balcony) { context.Balcony.Update(balcony); await context.SaveChangesAsync(); }
public async Task CreateBalcony(Balcony balcony) { context.Balcony.Add(balcony); await context.SaveChangesAsync(); }