public IActionResult GetAllBranches()
 {
     try
     {
         return(Ok(branchesLogic.GetAllBranches()));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }
示例#2
0
 public HttpResponseMessage GetAllBranches()
 {
     try
     {
         List <BranchDTO> branches = logic.GetAllBranches();
         return(Request.CreateResponse(HttpStatusCode.OK, branches));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(
                    HttpStatusCode.InternalServerError,
                    ErrorsManager.GetInnerMessage(ex)));
     }
 }