public async Task <List <BranchDto> > GetBranches() { var result = await _assetsStorage.GetBranches(); if (result != null) { return(result); } else { var resp = new HttpResponseMessage(System.Net.HttpStatusCode.NotFound) { Content = new StringContent($"Database maybe empty or there are errors when app try to access database"), ReasonPhrase = $"An error occurred when trying to get branches" }; throw new HttpResponseException(resp); } }