public void Add(TemplateAddCommand command, bool addEvent = true) { Id = Common.Common.GenerateGuid(); Code = command.Code; TemplateName = command.TemplateName ?? string.Empty; Thumbnail = command.Thumbnail ?? string.Empty; Structure = command.Structure ?? string.Empty; PathToView = command.PathToView ?? string.Empty; Status = command.Status; PageType = command.PageType; PageParameters = command.PageParameters ?? string.Empty; CreatedDateUtc = command.CreatedDateUtc; UpdatedDateUtc = command.CreatedDateUtc; CreatedUid = command.CreatedUid ?? string.Empty; UpdatedUid = command.CreatedUid ?? string.Empty; if (addEvent) { AddEvent(ToAddOrChangeCacheEvent()); } }
public async Task <CommandResult> SendCommand(TemplateAddCommand command) { CommandResult commandResult = await _commandService.SendAndReceiveResult <CommandResult>(command); return(commandResult); }