public async Task BuildAsync()
        {
            await _permissionGrantRepository.InsertAsync(
                new PermissionGrant(
                    _guidGenerator.Create(),
                    "MyPermission1",
                    UserPermissionValueProvider.ProviderName,
                    User1Id.ToString()
                    )
                );

            await _permissionGrantRepository.InsertAsync(
                new PermissionGrant(
                    _guidGenerator.Create(),
                    "MyDisabledPermission1",
                    UserPermissionValueProvider.ProviderName,
                    User1Id.ToString()
                    )
                );

            await _permissionGrantRepository.InsertAsync(
                new PermissionGrant(
                    _guidGenerator.Create(),
                    "MyPermission3",
                    UserPermissionValueProvider.ProviderName,
                    User1Id.ToString()
                    )
                );
        }
示例#2
0
 public void Build()
 {
     _permissionGrantRepository.Insert(
         new PermissionGrant(
             _guidGenerator.Create(),
             "MyPermission1",
             UserPermissionValueProvider.ProviderName,
             User1Id.ToString()
             )
         );
 }
        public void Build()
        {
            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySetting1", "42", GlobalSettingValueProvider.ProviderName));

            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySetting2", "default-store-value", GlobalSettingValueProvider.ProviderName));
            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySetting2", "user1-store-value", UserSettingValueProvider.ProviderName, User1Id.ToString()));
            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySetting2", "user2-store-value", UserSettingValueProvider.ProviderName, User2Id.ToString()));

            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySettingWithoutInherit", "default-store-value", GlobalSettingValueProvider.ProviderName));
            _settingRepository.InsertAsync(new Setting(_guidGenerator.Create(), "MySettingWithoutInherit", "user1-store-value", UserSettingValueProvider.ProviderName, User1Id.ToString()));
        }