Greetings,
after execute this query
it throw The type initializer for 'BNIS.AMS.DAL.FactoryClasses.EntityFactoryFactory' threw an exception.
using (var adapter = DataAccess.DataAdapterFactory.Create())
{
LinqMetaData metaData = new LinqMetaData(adapter);
var q = from c in metaData.SysDBRelation
select c;
var li = q.ToList();
}
stack trace
at BNIS.AMS.DAL.FactoryClasses.EntityFactoryFactory.GetFactory(Type typeOfEntity)
at BNIS.AMS.DAL.FactoryClasses.ElementCreator.GetFactoryImpl(Type typeOfEntity) in C:\Projects\AMS\Solution\BNIS.AMS.DAL\DatabaseGeneric\FactoryClasses\EntityFactories.cs:line 43197
at BNIS.AMS.DAL.FactoryClasses.ElementCreator.GetFactory(Type typeOfEntity) in C:\Projects\AMS\Solution\BNIS.AMS.DAL\DatabaseGeneric\FactoryClasses\EntityFactories.cs:line 43122
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteEntityProjection(QueryExpression toExecute)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery`1.Execute()
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at BNIS.AMS.BL.EntityDB.GetDBObjectName(String relationName) in C:\Projects\AMS\Solution\BNIS.AMS.BL\Globals\EntityDBMapping.cs:line 46
at BNIS.AMS.Win.Form1.kryptonButton1_Click(Object sender, EventArgs e) in C:\Projects\AMS\Solution\BNIS.AMS.Win\Form1.cs:line 39
at System.Windows.Forms.Control.OnClick(EventArgs e)
at ComponentFactory.Krypton.Toolkit.KryptonButton.OnClick(EventArgs e)
at ComponentFactory.Krypton.Toolkit.KryptonButton.b(Object A_0, MouseEventArgs A_1)
at ComponentFactory.Krypton.Toolkit.ButtonController.OnClick(MouseEventArgs e)
at ComponentFactory.Krypton.Toolkit.ButtonController.MouseUp(Control c, Point pt, MouseButtons button)
at ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
at ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
at ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
at ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
at ComponentFactory.Krypton.Toolkit.ViewManager.MouseUp(MouseEventArgs e, Point rawPt)
at ComponentFactory.Krypton.Toolkit.VisualControlBase.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at ComponentFactory.Krypton.Toolkit.VisualControlBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
using
VS 2008,
SQL 2008,
Adapter mode,
Shared templates.NET2.0
SD.LLBLGen.Pro.LinqSupportClasses.NET35.dll version 2.6.9.1008,
presets Adapter.General2008