public ActionResult <ItemsResponse <List <ProviderReport> > > SelectProviderLicenseList() { int code = 200; BaseResponse response = null; try { IUserAuthData user = _auth.GetCurrentUser(); if (user.Roles.Contains("Office Manager")) { List <ProviderReport> list = _service.SelectAllProviderList(user.Id); if (list == null) { code = 404; response = new ErrorResponse("Resource not found"); } else { response = new ItemsResponse <ProviderReport>() { Items = list }; } } } catch (Exception ex) { code = 500; response = new ErrorResponse(ex.Message); } return(StatusCode(code, response)); }