public int Add(Employee employee) { if (employee is null) { throw new ArgumentNullException(nameof(employee)); } dB.Add(employee); return(employee.Id); }
public int Add(Employee employee) { if (employee is null) { throw new ArgumentNullException(nameof(employee)); } _db.Add(employee); _db.SaveChanges(); _Logger.LogInformation($"Сотрудник id:{employee} добавлен"); return(employee.Id); }