Пример #1
0
 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");
 }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }