public Staff CreateStaff(Staff staff) { var tmpId = _staffService.GetAll().Last().Id; staff.Id = tmpId + 1; return(_staffService.CreateStaff(staff)); }
/// <summary> /// Produces new staffs and add them to data source /// </summary> /// <param name="count">how many restaurants will be hired</param> public void HireStaff(int count) { CreateStaffRequest request = BuildCreateStaffRequest(count); var response = _staffService.CreateStaff(request); if (response == null) { throw new Exception(""); } }
// POST: api/Staff public void Post([FromBody] Staff value) { StaffService.CreateStaff(value); }