Exemplo n.º 1
0
        public IHttpActionResult Get(Guid id)
        {
            try
            {
                if (id == Guid.Empty)
                {
                    return(BadRequest("EmployeeDetail Id cannot be empty."));
                }

                EmployeeDetailModel EmployeeDetail = _employeedetailService.GetEmployee(id);

                if (EmployeeDetail == null)
                {
                    return(NotFound());
                }

                return(Ok(EmployeeDetail));
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }