예제 #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);
 }