Exemple #1
0
        protected virtual async Task CreateAsync(CreateOrEditInput input)
        {
            var menuItemDefine = new MenuItemDefine();

            menuItemDefine.ParentMenuId = input.PId;
            menuItemDefine.DisplayName  = input.Name;
            menuItemDefine.Order        = 1;
            menuItemDefine.Name         = Pinyin.GetPinyin(menuItemDefine.DisplayName);
            await _menuRepository.InsertAsync(menuItemDefine);

            await CurrentUnitOfWork.SaveChangesAsync();
        }
Exemple #2
0
        protected virtual async Task CreateAsync(CreateOrEditInput input)
        {
            var menuItemDefine = new MenuItemDefine();

            menuItemDefine.MenuGuid       = Guid.NewGuid().ToString();
            menuItemDefine.ParentMenuGuid = input.PId;
            menuItemDefine.DisplayName    = input.Name;
            menuItemDefine.Order          = 1;
            menuItemDefine.Name           = _converter.Converter(menuItemDefine.DisplayName);
            await _menuRepository.InsertAsync(menuItemDefine);

            await CurrentUnitOfWork.SaveChangesAsync();
        }