Ejemplo n.º 1
0
        public async Task <IActionResult> CreateStaff([FromBody] CreateStaffDto model)
        {
            try
            {
                var staff = await _staffAppService.InsertStaff(model);

                if (staff < 1)
                {
                    return(BadRequest("Staff could not be created"));
                }
                return(Ok(staff));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }