public IActionResult Index() { var totalAssets = _branch.TotalAssets(); var branch = _branch.GetAll(); var List = branch .Select(result => new BranchDetailModel { Id = result.Id, ImageURL = result.ImageUrl, Name = result.Name, Address = result.Address, Telephone = result.Telephone, Description = result.Description, OpenDate = result.OpenDate }); var model_branch = new BranchIndexModel() { Branches = List, TotalAssets = totalAssets, TotalPatron = _branch.TotalPatrons() }; return(View(model_branch)); }