Пример #1
0
        public IActionResult Index()
        {
            _context.Users.ToList();
            var missionlist = _missonRepository.GetAll();

            return(View(missionlist));
        }
Пример #2
0
 public void MissionsLoad()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Create())
     {
         MissionRepository missionRepository = new MissionRepository(uow);
         var missions = missionRepository.GetAll();
     }
 }
Пример #3
0
 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);
         }
     }
 }