Example #1
0
 public DataLoader(string edmxFile, string dataFile)
 {
     Initialize(dataFile);
     using (EdmxReader <EntityTypeMapping> edmxReader = new EdmxReader <EntityTypeMapping>(edmxFile))
     {
         if (!edmxReader.TryLoad())
         {
             throw new Exception("Failed to load the edmx reader");
         }
         _EntityMapping = GetEntityTypeMapping(edmxReader);
     }
 }
Example #2
0
        public DataLoaderXml(EdmxReader <EntityTypeMapping> edmxReader, string dataFile)
        {
            Initialize(dataFile);

            if (!edmxReader.HasLoaded)
            {
                if (!edmxReader.TryLoad())
                {
                    throw new Exception("Failed to load the edmx reader");
                }
            }
            EntityMapping = GetEntityTypeMapping(edmxReader);
        }