コード例 #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);
         }
     }
 }