Пример #1
0
        public IActionResult Post([FromBody] Employee employee)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(StatusCode(StatusCodes.Status400BadRequest));
                }

                if (!_objBll.ValidateModel(employee))
                {
                    return(StatusCode(StatusCodes.Status400BadRequest));
                }

                return(Ok(_objBll.PostEmployeeDllDetal(employee)));
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }