public InMemoryDatastore(
            PersistentDatastore <AnswerEntity> answersDatastore,
            PersistentDatastore <QuestionEntity> questionsDatastore,
            PersistentDatastore <VoteEntity> voteDatastore,
            PersistentDatastore <VoterEntity> voterDatastore)
        {
            _answers   = new EntityDatastore <AnswerEntity>(answersDatastore);
            _questions = new EntityDatastore <QuestionEntity>(questionsDatastore);
            _votes     = new EntityDatastore <VoteEntity>(voteDatastore);
            _voters    = new EntityDatastore <VoterEntity>(voterDatastore);

            _dataStores = new IEntityDatastore[]
            {
                _answers,
                _questions,
                _votes,
                _voters
            };
        }
Exemple #2
0
 public EntityDatastore(PersistentDatastore <TEntity> persistentDatastore)
 {
     _persistentDatastore = persistentDatastore;
 }