Exemple #1
0
        public IActionResult Index(int gameID)
        {
            var model = new NoteIndexViewModel();

            model.GameID = gameID;
            model.Notes  = work.NoteRepository.GetAllForGame(gameID).Select(e => NoteModel.GenerateNoteModelFromDTO(e));
            return(View(model));
        }
Exemple #2
0
        public IActionResult Edit(int gameID, int id)
        {
            var model = new NoteEditViewModel();

            model.Note      = NoteModel.GenerateNoteModelFromDTO(work.NoteRepository.GetDTO(id));
            model.NoteTypes = work.NoteTypeRepository.GetAll().Select(e => NoteTypeModel.GenerateNoteTypeModelFromDTO(e));

            return(View(model));
        }