Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Pete O'Hanlon17-Mar-14 12:06
mvePete O'Hanlon17-Mar-14 12:06 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
BillWoodruff17-Mar-14 18:51
professionalBillWoodruff17-Mar-14 18:51 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Pete O'Hanlon17-Mar-14 21:15
mvePete O'Hanlon17-Mar-14 21:15 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Jörgen Andersson17-Mar-14 21:53
professionalJörgen Andersson17-Mar-14 21:53 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Pete O'Hanlon17-Mar-14 22:42
mvePete O'Hanlon17-Mar-14 22:42 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Jörgen Andersson17-Mar-14 23:43
professionalJörgen Andersson17-Mar-14 23:43 
GeneralRe: What is used to identify a Generic Type Parameter? Pin
Pete O'Hanlon18-Mar-14 0:50
mvePete O'Hanlon18-Mar-14 0:50 
QuestionAutomapper exception when converting object with inheriting members Pin
impeham16-Mar-14 5:19
impeham16-Mar-14 5:19 
I have the following objects:
public class Parent
{
    public BaseChild Child {get;set;}
}

public class BaseChild
{
}

public class ChildOne : BaseChild
{
    public string Member {get;set;}
}

"Parent" is mapped to a "Parent2" type from a different module (which has the same member BaseChild).
Mapper.CreateMap(typeof(Parent), typeof(Module2::Parent2));
Mapper.CreateMap(typeof(BaseChild), typeof(Module2::BaseChild));
Mapper.CreateMap(typeof(ChildOne ), typeof(Module2::ChildOne ));

I'm creating a Parent object:
Parent parent = new Parent
{
    Child = new ChildOne { Member = "Test" }
}

And try to convert:
object parent2 = Mapper.Map(parent, parent.GetType(), typeof(Module2::Parent2));

I get the following exception from auto mapper:
----------
{AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.

Mapping types:
ChildOne -> BaseChild
Test.ChildOne -> Test.BaseChild
----------

I need this mapping to work in order to be able to convert objects from a new "Parent2" type (in the 2nd module) to an old one.

How do I make it support inherited types of members in a converted class?
QuestionHow to access Advanced Class with API Pin
Member 1063699816-Mar-14 4:25
Member 1063699816-Mar-14 4:25 
AnswerRe: How to access Advanced Class with API Pin
Dave Kreskowiak16-Mar-14 7:31
mveDave Kreskowiak16-Mar-14 7:31 
GeneralRe: How to access Advanced Class with API Pin
Member 1063699816-Mar-14 9:50
Member 1063699816-Mar-14 9:50 
GeneralRe: How to access Advanced Class with API Pin
Dave Kreskowiak16-Mar-14 14:16
mveDave Kreskowiak16-Mar-14 14:16 
GeneralRe: How to access Advanced Class with API Pin
Member 1063699816-Mar-14 15:56
Member 1063699816-Mar-14 15:56 
QuestionHow create table in SQL Server using C# and data from Excel. Pin
Sick Series15-Mar-14 4:32
Sick Series15-Mar-14 4:32 
AnswerRe: How create table in SQL Server using C# and data from Excel. Pin
OriginalGriff15-Mar-14 4:48
mveOriginalGriff15-Mar-14 4:48 
AnswerRe: How create table in SQL Server using C# and data from Excel. Pin
Maciej Los15-Mar-14 6:43
mveMaciej Los15-Mar-14 6:43 
GeneralRe: How create table in SQL Server using C# and data from Excel. Pin
OriginalGriff16-Mar-14 0:05
mveOriginalGriff16-Mar-14 0:05 
GeneralW:Re: How create table in SQL Server using C# and data from Excel. Pin
Maciej Los16-Mar-14 0:14
mveMaciej Los16-Mar-14 0:14 
GeneralRe: How create table in SQL Server using C# and data from Excel. Pin
jschell17-Mar-14 8:34
jschell17-Mar-14 8:34 
GeneralRe: How create table in SQL Server using C# and data from Excel. Pin
OriginalGriff17-Mar-14 9:03
mveOriginalGriff17-Mar-14 9:03 
GeneralRe: How create table in SQL Server using C# and data from Excel. Pin
jschell18-Mar-14 8:07
jschell18-Mar-14 8:07 
GeneralRe: How create table in SQL Server using C# and data from Excel. Pin
OriginalGriff18-Mar-14 9:08
mveOriginalGriff18-Mar-14 9:08 
QuestionIEnumerable and disposal Pin
Rob Philpott14-Mar-14 0:31
Rob Philpott14-Mar-14 0:31 
AnswerRe: IEnumerable and disposal Pin
Richard Deeming14-Mar-14 2:06
mveRichard Deeming14-Mar-14 2:06 
GeneralRe: IEnumerable and disposal Pin
Rob Philpott14-Mar-14 2:27
Rob Philpott14-Mar-14 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.