Пример #1
0
 public Employee AddEmployee(Employee employee)
 {
     if (employee != null)
     {
         dbContext.Employees.Add(employee);
         dbContext.SaveChanges();
         return(employee);
     }
     return(null);
 }
Пример #2
0
 public async Task <Item> AddItem(Item Item)
 {
     if (Item != null)
     {
         dbContext.Item.Add(Item);
         dbContext.SaveChanges();
         return(Item);
     }
     return(null);
 }