public IActionResult Index() { _context.Users.ToList(); var missionlist = _missonRepository.GetAll(); return(View(missionlist)); }
public void MissionsLoad() { using (IUnitOfWork uow = UnitOfWorkFactory.Create()) { MissionRepository missionRepository = new MissionRepository(uow); var missions = missionRepository.GetAll(); } }
public void MissionUpdate() { using (IUnitOfWork uow = UnitOfWorkFactory.Create()) { MissionRepository missionRepository = new MissionRepository(uow); var missions = missionRepository.GetAll(); if (missions.Count > 0) { Mission myMission = missions.FirstOrDefault(); myMission.Description += " (desc)"; myMission.StartDate = myMission.StartDate.Value.AddDays(7); missionRepository.Update(myMission); } } }