Esempio n. 1
0
        public DocumentSchema(DocumentMapping mapping)
        {
            _mapping = mapping;

            Table  = new DocumentTable(_mapping);
            Upsert = new UpsertFunction(_mapping);
            Insert = new InsertFunction(_mapping);
            Update = new UpdateFunction(_mapping);

            if (_mapping.UseOptimisticConcurrency)
            {
                Overwrite = new OverwriteFunction(_mapping);
            }
        }
Esempio n. 2
0
        public DocumentSchema(DocumentMapping mapping)
        {
            _mapping = mapping;

            Table = new DocumentTable(_mapping);

            foreach (var metadataColumn in Table.Columns.OfType <MetadataColumn>())
            {
                metadataColumn.RegisterForLinqSearching(mapping);
            }

            Upsert = new UpsertFunction(_mapping);
            Insert = new InsertFunction(_mapping);
            Update = new UpdateFunction(_mapping);

            if (_mapping.UseOptimisticConcurrency)
            {
                Overwrite = new OverwriteFunction(_mapping);
            }
        }