Пример #1
0
        public Staff CreateStaff(Staff staff)
        {
            var tmpId = _staffService.GetAll().Last().Id;

            staff.Id = tmpId + 1;
            return(_staffService.CreateStaff(staff));
        }
Пример #2
0
        /// <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("");
            }
        }
Пример #3
0
 // POST: api/Staff
 public void Post([FromBody] Staff value)
 {
     StaffService.CreateStaff(value);
 }