public IEnumerable <string> GetBranchHours(int branchId) { var hours = _context.BranchHours .Include(bh => bh.Branch) .Where(bh => bh.Branch.Id == branchId); return(DateHelpers.NormalizeBranchHours(hours)); // DateHelpers - OUR class which we implement in LibraryServices }
public IEnumerable <string> GetBranchHours(int branchId) { var hours = _context.BranchHours .Include(bh => bh.Branch) .Where(bh => bh.Branch.Id == branchId); var displayHours = DateHelpers.HumanizeBusinessHours(hours); return(displayHours); }