public async Task UpdateAsync(Models.DiscountStock discountStock) { try { _context.DiscountStock.Update(discountStock); _context.Entry(discountStock).Property(x => x.InsertDate).IsModified = false; _context.Entry(discountStock).Property(x => x.RegisterEmployeeId).IsModified = false; await _context.SaveChangesAsync(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Update(PositionName positionName) { try { _context.PositionName.Update(positionName); _context.Entry(positionName).Property(x => x.InsertDate).IsModified = false; _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Update(Category category) { try { _context.Category.Update(category); _context.Entry(category).Property(x => x.InsertDate).IsModified = false; _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public async Task UpdateAsync(SaleBox saleBox) { try { _context.SaleBox.Update(saleBox); _context.Entry(saleBox).Property(x => x.Opening).IsModified = false; await _context.SaveChangesAsync(); } catch (Exception e) { throw new Exception(e.Message); } }
public void UpdateAddress(Address address) { try { _context.Address.Update(address); _context.Entry(address).Property(x => x.InsertDate).IsModified = false; _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }