public static void GetAllAwards() { var collection = awardLogic.GetAllAwards(); foreach (var item in awardLogic.GetAllAwards()) { Console.WriteLine(item); } }
public static void GetAllAwards() { foreach (var item in awardLogic.GetAllAwards()) { Console.WriteLine(item); } }
private static void ShowAwards(IAwardLogic awardLogic) { Console.WriteLine("Id Title"); foreach (Award award in awardLogic.GetAllAwards()) { Console.WriteLine(award); } }
public IEnumerable <DisplayUserVM> GetAllUsersWithAwards() { var awards = awardBll.GetAllAwards().ToArray(); var users = userBll.GetAllUsers().ToList(); List <DisplayUserVM> usersVM = Mapper.Map <IEnumerable <DisplayUserVM> >(userBll.GetAllUsers()).ToList(); for (int i = 0; i < usersVM.Count; i++) { usersVM[i].Awards = awardBll.GetAwardsForUser(usersVM[i].Id).ToList(); } return(usersVM); }
public ActionResult Index() { ViewBag.Message = "Award List"; var listOfEntities = awardLogic.GetAllAwards(); List <AwardModel> listOfModels = new List <AwardModel>(); foreach (var item in listOfEntities) { listOfModels.Add(new AwardModel { ID = item.ID, Title = item.Title }); } return(View(listOfModels)); }
public ActionResult ShowPotentialUserAwards(int id) { ViewBag.User = userLogic.GetUserByID(id); List <Award> listOfEntities = (List <Award>)awardLogic.GetAllAwards(); List <Award> alreadyAwarded = (List <Award>)userAndAwardLogic.GetAwardsOfUserByID(id); List <AwardModel> listOfModels = new List <AwardModel>(); foreach (var item in listOfEntities) { if (alreadyAwarded.Find(x => x.ID == item.ID) == null) { listOfModels.Add(new AwardModel { ID = item.ID, Title = item.Title }); } } return(View(listOfModels)); }
public IEnumerable <AwardDTO> GetAllAwards() { return(awardBll.GetAllAwards()); }
private static void ListAllAwards(IAwardLogic awardLogic) { try { foreach (var award in awardLogic.GetAllAwards()) { Console.WriteLine($"{award.Id}. Title: \"{award.Title}\""); } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine(); }