Beispiel #1
0
        public IDocumentStorage StorageFor(Type documentType)
        {
            return(_documentTypes.GetOrAdd(documentType, type =>
            {
                var mapping = MappingFor(documentType);
                var storage = DocumentStorageBuilder.Build(mapping);

                if (!DocumentTables().Contains(mapping.TableName))
                {
                    _creation.CreateSchema(this, mapping);
                }

                return storage;
            }));
        }
Beispiel #2
0
 public IDocumentStorage BuildStorage(IDocumentSchema schema)
 {
     return(DocumentStorageBuilder.Build(schema, this));
 }