public IEnumerable <Award> GetAll() { var cacheResult = _cacheLogic.Get <IEnumerable <Award> >(ALL_AWARDS_CACHE_KEY); if (cacheResult == null) { var result = _awardDAO.GetAll(); _cacheLogic.Add(ALL_AWARDS_CACHE_KEY, _awardDAO.GetAll()); return(result); } return(cacheResult); }
public IEnumerable <Award> GetAll() { foreach (var award in _awardDAO.GetAll()) { yield return(GetByID(award.ID)); } }
public User GetByID(Guid id) { var user = _userDAO.GetByID(id); var awardsId = _userAwardDAO.GetAll().Where(p => p.IdUser == id).Select(p => p.IdAward); foreach (var award in _awardDAO.GetAll()) { foreach (var awardId in awardsId) { if (awardId == award.ID) { user.Awards.Add(award); } } } return(user); }
public IEnumerable <Award> GetAll() { return(_awardDao.GetAll()); }
public IEnumerable <Award> GetAll() { var result = _awardDAO.GetAll(); return(result); }