public DefaultFixture() { var services = new ServiceCollection(); services.TryAddSingleton <IReflectionHelper, ReflectionHelper>(); services.TryAddSingleton <IPatcherProvider, PatcherProvider>(); services.TryAddSingleton <EnumerablePatcher>(); services.TryAddSingleton <DictionaryPatcher>(); services.TryAddSingleton <ValuePatcher>(); services.TryAddSingleton <DynamicPatcher>(); services.TryAddSingleton <ObjectPatcher>(); services.TryAddSingleton <IIncludeApplicator, IncludeApplicator>(); ServiceProvider = services.BuildServiceProvider(); RightsService = new OpenRightExpressionsHelper <User>(); Instanciator = new DefaultInstanciator <User>(); InMemoryStorage = new InMemoryStorageService(); IncludeApplicator = ServiceProvider.GetRequiredService <IIncludeApplicator>(); UsersRepo = new Repository <User>(InMemoryStorage, RightsService, IncludeApplicator); }
public ReadOnlyRepository(IStorageService storageService, IRightExpressionsHelper <TEntity> rightExpressionsHelper, IIncludeApplicator includeApplicator) { StorageService = storageService; RightExpressionsHelper = rightExpressionsHelper; _includeApplicator = includeApplicator; }
public Repository(IStorageService storageService, IRightExpressionsHelper <TEntity> rightExpressionsHelper, IIncludeApplicator includeApplicator) : base(storageService, rightExpressionsHelper, includeApplicator) { }