Beispiel #1
0
        public static TSqlTypedModel Get(string path)
        {
            lock (Models)
            {
                if (Models.ContainsKey(path))
                {
                    var reference = Models[path];
                    reference.ReferenceCount++;
                    return(reference.Model);
                }

                var newReference = new ModelReference();
                newReference.Model          = new TSqlTypedModel(path);
                newReference.ReferenceCount = 1;
                Models.Add(path, newReference);
                return(newReference.Model);
            }
        }
Beispiel #2
0
        public static TSqlTypedModel Get(string path)
        {
            lock (Models)
            {
                if (Models.ContainsKey(path))
                {
                    var reference = Models[path];
                    reference.ReferenceCount++;
                    return reference.Model;
                }

                var newReference = new ModelReference();
                newReference.Model = new TSqlTypedModel(path);
                newReference.ReferenceCount = 1;
                Models.Add(path, newReference);
                return newReference.Model;
            }
        }