DataContext ctor / iqml question
Posted: Thu 21 Jul 2011 20:19
Hello,
I'm looking for more information on iqml files. Currently when I try to create a new instance of a Devart.Data.Linq.DataContext object (ctor=DataContext(string connectionString, MappingSource mapping)), I get an exception. Unfortunately that exception doesn't contain any useful (to me) information about the problem. I'm guessing the problem is with my MappingSource, but I don't know what specifically is wrong with it.
The Exception that I get is:
System.ArgumentException was unhandled by user code
Message=An item with the same key has already been added.
Source=mscorlib
StackTrace:
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Devart.Data.Linq.Mapping.MetaTypeBase.Initialize()
at Devart.Data.Linq.Mapping.aw.b()
at Devart.Data.Linq.Mapping.u.b()
at Devart.Data.Linq.Mapping.ay..ctor(MetaModel A_0, MetaTable A_1, ae A_2, Type A_3, MetaType A_4)
at Devart.Data.Linq.Mapping.u..ctor(av A_0, ak A_1, ae A_2, Type A_3)
at Devart.Data.Linq.Mapping.ak..ctor(av A_0, d A_1, Type A_2)
at Devart.Data.Linq.Mapping.av.b()
at Devart.Data.Linq.Mapping.av.e()
at Devart.Data.Linq.Mapping.av..ctor(MappingSource A_0, Type A_1, t A_2)
at Devart.Data.Linq.Mapping.XmlMappingSource.CreateModel(Type dataContextType)
at System.Data.Linq.Mapping.MappingSource.GetModel(Type dataContextType)
at Devart.Data.Linq.DataContext.a(Object A_0, MappingSource A_1, Type A_2)
at Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
Is there any documentation on the requirements of an iqml file? In my case I am trying to convert an existing xml file generated by sqlmetal from a SQL Server database, so I think I must just be missing some value(s) that you require but LinqToSql and Sql Server do not.
Thank you,
Patrick
I'm looking for more information on iqml files. Currently when I try to create a new instance of a Devart.Data.Linq.DataContext object (ctor=DataContext(string connectionString, MappingSource mapping)), I get an exception. Unfortunately that exception doesn't contain any useful (to me) information about the problem. I'm guessing the problem is with my MappingSource, but I don't know what specifically is wrong with it.
The Exception that I get is:
System.ArgumentException was unhandled by user code
Message=An item with the same key has already been added.
Source=mscorlib
StackTrace:
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Devart.Data.Linq.Mapping.MetaTypeBase.Initialize()
at Devart.Data.Linq.Mapping.aw.b()
at Devart.Data.Linq.Mapping.u.b()
at Devart.Data.Linq.Mapping.ay..ctor(MetaModel A_0, MetaTable A_1, ae A_2, Type A_3, MetaType A_4)
at Devart.Data.Linq.Mapping.u..ctor(av A_0, ak A_1, ae A_2, Type A_3)
at Devart.Data.Linq.Mapping.ak..ctor(av A_0, d A_1, Type A_2)
at Devart.Data.Linq.Mapping.av.b()
at Devart.Data.Linq.Mapping.av.e()
at Devart.Data.Linq.Mapping.av..ctor(MappingSource A_0, Type A_1, t A_2)
at Devart.Data.Linq.Mapping.XmlMappingSource.CreateModel(Type dataContextType)
at System.Data.Linq.Mapping.MappingSource.GetModel(Type dataContextType)
at Devart.Data.Linq.DataContext.a(Object A_0, MappingSource A_1, Type A_2)
at Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
Is there any documentation on the requirements of an iqml file? In my case I am trying to convert an existing xml file generated by sqlmetal from a SQL Server database, so I think I must just be missing some value(s) that you require but LinqToSql and Sql Server do not.
Thank you,
Patrick