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