public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, Telephone = branch.Telephone, OpenDate = branch.OpenDate.ToString("yyyy-mm-dd"), NumberOfAssets = _branch.GetAssets(branch.Id).Count(), NumberOfPatrons = _branch.GetPatrons(branch.Id).Count(), TotalAssetValue = _branch.GetAssets(id).Sum(x => x.Cost), ImageUrl = branch.ImageUrl, HoursOpen = _branch.GetBranchHours(id) }; }
public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, Address = branch.Address, Telephone = branch.Telephone, OpenDate = branch.OpenDate.ToString("yyyy-MM-dd"), NumberOfAssets = _branch.GetAssets(branch.Id).Count(), NumberOfMembers = _branch.GetMembers(id).Count(), ImageUrl = branch.ImageUrl, HoursOpen = _branch.GetBranchHours(id) }; return(View(model)); }
public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new BranchDetailModel { BranchName = branch.Name, Description = branch.Description, Address = branch.Address, Telephone = branch.Telephone, BranchOpenedDate = branch.OpenDate.ToString("yyyy-MM-dd"), NumberOfPatrons = _branch.GetPatronCount(id), NumberOfAssets = _branch.GetAssetCount(id), TotalAssetValue = _branch.GetAssetsValue(id), ImageUrl = branch.ImageUrl, HoursOpen = _branch.GetBranchHours(id) }; return(View(model)); }
public IActionResult Detail(int id) { var branch = _branchServices.Get(id); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, Address = branch.Address, Telephone = branch.Telephone, OpenDate = branch.OpenDate.ToString("yyyy-MM-dd"), NumberOfAssets = _branchServices.GetAssets(id).Count(), NumberOfPatrons = _branchServices.GetPatrons(id).Count(), TotalAssetValue = _branchServices.GetAssets(id).Sum(a => a.Cost), ImageUrl = branch.ImageUrl, HoursOpen = _branchServices.GetBranchHours(id) }; return(View(model)); }
public IActionResult Detail(int Id) { var branch = _branch.Get(Id); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, MobileNumber = branch.MobileNumber, OpenDate = branch.OpenDate, NumberOfAssets = _branch.GetAssets(branch.Id).Count(), NumberOfPatrons = _branch.GetPatrons(branch.Id).Count(), TotalAssetValue = _branch.GetAssets(Id).Sum(a => a.Cost), ImageURl = branch.ImageUrl, HoursOpen = _branch.GetBranchHours(Id) }; return(View(model)); }
public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new LibraryBranchDetailModel() { Id = branch.Id, Name = branch.Name, Address = branch.Address, Telephone = branch.Telephone, OpenDate = branch.OpenDate.ToString("dd-MM-yyyy"), NumberOfAssets = _branch.GetAllAssets(id).Count(), NumberOfPatrons = _branch.GetAllPatrons(id).Count(), TotlaAssetValue = _branch.GetAllAssets(id).Sum(asset => asset.Cost), ImageUrl = branch.ImageUrl, BranchHours = _branch.GetBranchHours(id) }; return(View(model)); }
public IActionResult Detail(int branchId) { var branch = _branch.Get(branchId); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, Address = branch.Address, Telephone = branch.Phone, OpenDate = branch.OpenDate, IsOpen = _branch.IsBranchOpen(branch.Id), NumberOfAssets = _branch.GetAssets(branch.Id).Count(), NumberOfPatrons = _branch.GetPatrons(branch.Id).Count(), TotalAssetValue = _branch.GetAssets(branch.Id).Sum(a => a.Cost), ImageUrl = branch.ImageUrl, HoursOpen = _branch.GetBranchHours(branch.Id) }; return(View(model)); }
public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new BranchDetailModel { Id = branch.Id, Address = branch.Address, Description = branch.Description, HoursOpen = _branch.GetBranchHours(id), ImageUrl = branch.ImageUrl, IsOpen = _branch.IsBranchOpen(id), Name = branch.Name, NumberOfAssets = branch.LibraryAssets.Count(), NumberOfPatrons = branch.Patrons.Count(), OpenDate = branch.OpenDate.ToString("yyyy-MM-dd"), Telephone = branch.Telephone, TotalAssetValue = branch.LibraryAssets.Sum(asset => asset.Cost) }; return(View(model)); }
public IActionResult Detail(int id) { var branch = _branch.Get(id); var model = new BranchDetailModel { Id = branch.Id, Name = branch.Name, IsOpen = _branch.IsBranchOpen(branch.Id), NumberOfAssets = _branch.GetAssets(branch.Id).Count(), NumberOfPatrons = _branch.GetPatrons(branch.Id).Count(), Address = branch.Address, Description = branch.Description, HoursOpen = _branch.GetBranchHours(id), Telephone = branch.Telephone, ImageUrl = branch.ImageUrl, OpenDate = branch.OpenDate.ToString("dd-MM-yyyy"), TotalAssetValue = _branch.GetAssets(id).Sum(a => a.Cost) }; return(View(model)); }