示例#1
0
 public void Delete(EFacultet item)
 {
     if (item == _item.GetAll().FirstOrDefault(x => item.Name == item.Name))
     {
         _item.Delete(item);
         Save();
         context.Dispose();
     }
 }
示例#2
0
 public EFacultet Add(EFacultet item)
 {
     if (item != _item.GetAll().FirstOrDefault(x => item.Name == item.Name))
     {
         EFacultet temp = _item.Add(item);
         Save();
         return(temp);
     }
     else
     {
         throw new Exception("This Subject Alredy Added");
     }
 }
示例#3
0
 public void Delete(EFacultet item)
 {
     _context.Facultet.Remove(item);
 }
示例#4
0
 public EFacultet Add(EFacultet item)
 {
     return(_context.Facultet.Add(item));
 }