public void Delete(EFacultet item) { if (item == _item.GetAll().FirstOrDefault(x => item.Name == item.Name)) { _item.Delete(item); Save(); context.Dispose(); } }
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"); } }
public void Delete(EFacultet item) { _context.Facultet.Remove(item); }
public EFacultet Add(EFacultet item) { return(_context.Facultet.Add(item)); }