예제 #1
0
        public IHttpActionResult Post(EmployeeDetailModel EmployeeDetail)
        {
            try
            {
                if (EmployeeDetail == null)
                {
                    return(BadRequest("EmployeeDetail cannot be null or empty."));
                }

                Guid result = _employeedetailService.Create(EmployeeDetail);

                return(Created(result.ToString(), EmployeeDetail));
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }