public async Task <bool> Update([FromBody] ChannelUpdateRequestVM requestVm) { Channel request = requestVm.ConvertUpdate(); var response = await this.ChannelApplication.Update(request); return(response); }
/// <summary> /// ConvertUpdate converts object of ChannelUpdateRequestVM type to Channel type. /// </summary> /// <param name="vm"></param> /// <returns></returns> public static Channel ConvertUpdate(this ChannelUpdateRequestVM vm) { var model = new Channel { ChannelId = vm.ChannelId, ChannelName = vm.ChannelName, Description = vm.Description ?? "", Active = vm.Active, CreatedById = vm.CurrentUserId }; return(model); }