public virtual async Task <MenuItemDto> CreateAsync(MenuItemCreateInput input) { return(await RequestAsync <MenuItemDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue { { typeof(MenuItemCreateInput), input } })); }
public virtual async Task <MenuItemDto> CreateAsync(MenuItemCreateInput input) { var menuItem = new MenuItem( GuidGenerator.Create(), input.DisplayName, input.Url.IsNullOrEmpty() ? "#" : input.Url, input.IsActive, input.ParentId, input.Icon, input.Order, input.Target, input.ElementId, input.CssClass, CurrentTenant.Id ); if (input.PageId.HasValue) { MenuManager.SetPageUrl(menuItem, await PageRepository.GetAsync(input.PageId.Value)); } await MenuItemRepository.InsertAsync(menuItem); return(ObjectMapper.Map <MenuItem, MenuItemDto>(menuItem)); }
public virtual Task <MenuItemDto> CreateAsync(MenuItemCreateInput input) { return(MenuItemAdminAppService.CreateAsync(input)); }