Пример #1
0
        public async Task <ActionResult> EditChannelModal(int channelId)
        {
            var channelDto = await _channelAppService.Get(new EntityDto <long>(channelId));

            var model = new EditChannelModalViewModel
            {
                Channel = channelDto
            };

            return(View("_EditChannelModal", model));
        }
Пример #2
0
        public async Task <PartialViewResult> CreateOrEditModal(int?id)
        {
            ChannelDto dto;

            if (id.HasValue)
            {
                dto = await _channelAppService.Get(new EntityDto(id.Value));
            }
            else
            {
                dto = new ChannelDto();
            }
            return(PartialView("_CreateOrEditModal", dto));
        }