public static IConfigure UsingRavenDBEmbedded(this IHaveStorage storage, Action<EntityContextConfiguration> configureCallback)
        {
            var entityContextConfiguration = new EntityContextConfiguration
            {
                IdPropertyRegister = new NullIdPropertyRegister()
            };
            if (configureCallback != null)
                configureCallback(entityContextConfiguration);

            var connection = new Bifrost.RavenDB.EntityContextConnection(entityContextConfiguration);
            entityContextConfiguration.Connection = connection;
            storage.EntityContextConfiguration = entityContextConfiguration;

            return Configure.Instance;
        }
Beispiel #2
0
 public EntityContext(EntityContextConnection connection)
 {
     _connection = connection;
     _session    = connection.DocumentStore.OpenSession();
     _indexName  = connection.DocumentStore.Conventions.FindTypeTagName(typeof(T));
 }