public CategoryResponse GetCategoryById([FromBody] CategoryRequest categoryRequest) { CategoryResponse response; try { CategoryResponse Authenticated = Authentication.CheckAuthentication(categoryRequest.Authentication.Email, categoryRequest.Authentication.Password); if (Authenticated != null) { return(Authenticated); } Category _category = _categoryService.GetById(categoryRequest.Category.Id); return(CreateResponse.ReturnResponse(_category)); } catch (Exception exception) { return(response = new CategoryResponse() { status = new Models.Attribute.Status() { Code = (int)Enums.MessageCode.Error, Message = Enums.MessageCode.Error.ToString() + exception.Message } }); } }