Exemple #1
0
        public static DatabaseDescriptor Get(ObjectContext db)
        {
            DatabaseDescriptor result;

            lock (_byTypeLock)
            {
                var type = db.GetType();
                if (!_descriptorByType.TryGetValue(type, out result))
                {
                    result = new DatabaseDescriptor(db);
                    _descriptorByType[type] = result;
                }
            }
            return(result);
        }
Exemple #2
0
 public CloudDiagramContext() : base("CloudDiagram")
 {
     Configuration.UseDatabaseNullSemantics = true;
     _databaseDescriptor = DatabaseDescriptor.Get(this);
 }