コード例 #1
0
        public async Task <ActionResult> Edit(int id)
        {
            var amendment = await _amendmentService.GetAsync(id);

            if (amendment == null)
            {
                return(NotFound());
            }

            var model = _mapper.Map <AmendmentEditViewModel>(amendment);

            model.Languages = await _languageDataService.GetAllAsync();

            return(View(model));
        }
コード例 #2
0
        public async Task GetAmendment(int amendmentId)
        {
            var amendment = await _amendmentService.GetAsync(amendmentId);

            await Clients.Caller.SendAsync("amendment.amendmentReturn", amendment);
        }