Skip to content

Instantly share code, notes, and snippets.

@hotgazpacho
Created December 17, 2010 19:43
Show Gist options
  • Select an option

  • Save hotgazpacho/745577 to your computer and use it in GitHub Desktop.

Select an option

Save hotgazpacho/745577 to your computer and use it in GitHub Desktop.
DataTableReader dataReader = dataTable.CreateDataReader();
return Mapper.Map<IDataReader, IEnumerable<T>>(dataReader);
at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)
at AutoMapper.MappingEngine.Map(Object source, Type sourceType, Type destinationType)
at AutoMapper.MappingEngine.Map[TSource,TDestination](TSource source)
at AutoMapper.Mapper.Map[TSource,TDestination](TSource source)
at XXX.Modules.Library.Controllers.clsCodePageControler.GetLibraryRequirementsFromDataTable[T](DataTable dataTable) in C:\Dev\XXXDev\Modules\Library\XXX.Modules.Library\Controllers\clsCodePageControler.cs:line 1757
at XXX.Modules.Library.Controllers.clsCodePageControler.GenerateExamsForComponentsFromTemplateExams(clsCodePage codePage) in C:\Dev\XXXDev\Modules\Library\XXX.Modules.Library\Controllers\clsCodePageControler.cs:line 2869
at XXX.Modules.Library.frmCodePage.mnuAddExam_Click(Object sender, EventArgs e) in C:\Dev\XXXDev\Modules\Library\XXX.Modules.Library\Forms\Code Page Forms\frmCodePage.cs:line 5343
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at XXXSuite.Program.Main() in C:\Dev\XXXDev\Suite\XXXSuite\Program.cs:line 37
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
@hotgazpacho

Copy link
Copy Markdown
Author

Trying to map System.Data.IDataReader to System.Collections.Generic.IEnumerable`1[[XXX.Modules.Library.clsLibraryRequirements, XXX.Modules.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=28bba1766bc3b6a5]].
Exception of type 'AutoMapper.AutoMapperMappingException' was thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment