public static void Load_RegionMap_Table() { try { SmartMap_DomainContext context = new SmartMap_DomainContext(); LoadOperation<RegionMap> loadOp = context.Load<RegionMap>(context.GetRegionMapsQuery(), RegionMapTable_Loaded, null); } catch (Exception ex) { string msg = ex.Message; if (ex.InnerException != null) msg += ("Inner: \n" + ex.InnerException.Message); System.IO.File.WriteAllText(@"C:\inetpub\wwwroot\snfgis\load_regionmaptable1_error.txt", msg); } }