public int Update(T item) { if (item != null) { _dataContext.Entry(item).State = EntityState.Modified; _dataContext.SaveChanges(); return(item.Id); } throw new ArgumentException("item is null in database", "item"); }
public int Update(Lessor item) { if (item != null) { _dataBase.Entry(item).State = EntityState.Modified; _dataBase.SaveChanges(); return(item.Id); } throw new ArgumentException("item is null in LessorRepository"); }
public int Update(RenteredResource item) { if (item != null) { _dataBase.Entry(item).State = EntityState.Modified; _dataBase.SaveChanges(); return(item.Id); } throw new ArgumentException("item is null in RenteredMachineRepository"); }