private static Dictionary <DatabaseObject, StorageEntitySet> ConstructDatabaseObjectToEntitySetMappings(StorageEntityContainer sec) { Debug.Assert(null != sec, "was passed a null StorageEntityContainer"); var mappings = new Dictionary <DatabaseObject, StorageEntitySet>(); if (null != sec) { foreach (var es in sec.EntitySets()) { var ses = es as StorageEntitySet; if (null != ses) { var dbObj = DatabaseObject.CreateFromEntitySet(ses); mappings.Add(dbObj, ses); } } } return(mappings); }
private void RecordStorageProperties(StorageEntityContainer sec) { foreach (var es in sec.EntitySets()) { var ses = es as StorageEntitySet; if (null != ses) { var dbObj = DatabaseObject.CreateFromEntitySet(ses); var et = ses.EntityType.Target; if (null == et) { Debug.Fail("Null EntityType"); } else { foreach (var prop in et.Properties()) { AddDbObjToPropertiesMapping(dbObj, prop); } } } } }
private void RecordStorageEntitySetsAndProperties(StorageEntityContainer sec) { foreach (var es in sec.EntitySets()) { var ses = es as StorageEntitySet; if (null != ses) { var dbObj = DatabaseObject.CreateFromEntitySet(ses); _allTablesAndViews.Add(dbObj, ses.LocalName.Value); var et = ses.EntityType.Target; if (null == et) { Debug.Fail("Null EntityType"); } else { foreach (var prop in et.Properties()) { AddDbObjToColumnMapping(dbObj, prop); } } } } }