Пример #1
0
        // GET: EntryPlatform/Edit/5
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var dbModel = _entryPlatformRepository.Select(id ?? 0);

            if (dbModel.Id == 0)
            {
                return(NotFound());
            }

            var vwModel = _mapper.Map <EntryPlatformListViewModel>(dbModel);

            SetSelectList();
            return(View(vwModel));
        }
Пример #2
0
        public JsonResult Get(int id)
        {
            var dbModel = EntryPlatformRepository.Select(id);

            return(new JsonResult(dbModel));
        }