Monday 15 September 2014

Automapper is mapping incorrectly? -


I have two objects, the project is a DB unit and IPOZ, which I am trying to save from the database:

  Public Interface IPOJX {int ProjectID {get; Set; } String JobNumber {get; Set; } String JobName {get; Set; } String ProjectLocation {get; Set; } Int? FITAPID {Receive; Set; } Decimal? Charge {receives; Set; } Decimal? Manufacturing {get; Set; } Decimal? CostPerSquareFoot {get; Set; } Decimal? Squarefount {Get; Set; } Get String Memos { Set; } Date time? Date month {received; Set; } Ent JobStatusID {Received; Set; } Int ProjectTypeID {get; Set; }} // Heritage is actually in a partial orbit that does not get an override public partial class project: IPOject {public project} {this.ProjectContacts = new HashSet & lt; ProjectContact & gt; (); this. Project Consultants = New Hashet & lt; Project Consultant & gt; (); } Public int ProjectID {get; Set; } Public String JobNumber {get; Set; } Public String JobName {get; Set; } Public taps qualified & lt; Int & gt; FITAPID {Receive; Set; } Public taps qualified & lt; Decimal & gt; Charge {receives; Set; } Get Public Ink JobStatusID {Get; Set; } Public string memos {get; Set; } Public taps qualified & lt; Decimal & gt; Acreage {get; Set; } Public taps qualified & lt; Decimal & gt; Squarefount {Get; Set; } Public taps qualified & lt; Decimal & gt; Manufacturing {get; Set; } Public taps qualified & lt; Decimal & gt; Budget value {get; Set; } Public taps qualified & lt; Decimal & gt; {Get ActualPrice; Set; } Public taps qualified & lt; System.DateTime & gt; Date month {received; Set; } Public taps qualified & lt; Decimal & gt; CostPerSquareFoot {get; Set; } Public String ProjectLocation {get; Set; } Public int ProjectTypeID {get; Set; } Public taps qualified & lt; System.DateTime & gt; StartDate {Get; Set; } Public taps qualified & lt; Int & gt; PhaseID {Get; Set; } Public String ProjectDescription {get; Set; } Public taps qualified & lt; Int & gt; Architected {receive; Set; } Public taps qualified & lt; Int & gt; Manager ID {Receive; Set; } Public taps qualified & lt; Int & gt; ArchiveLocationID {Receive; Set; } Public virtual iconenging & lt; Project Contact & gt; Get ProjectContacts { Set; } Public Virtual Feat Type Feet {get; Set; } Public Virtual Job Stuti Jobstattu {Get; Set; } Public virtual iconenging & lt; Project Consultant & gt; Get project consultants; Set; } Public Virtual Person (Received; Set; } Public Virtual Storage Location Transfer {Received; Set; } Public Virtual Person Person1 {get; Set; } Public virtual phase step {received; Set; } Public Virtual Project Type Project Type {get; Set; }}  

My map has been created with me:

  Mapper Createmap & lt; IPOjet, Data Project & gt; ();  

But for any reason whenever I call the map:

  // MappingSyear is a cover that I'm all set around Automapor so that I Var will add to the project = _mappingService.Map & lt; IProject, Data.Project & gt; (request);  

I get this error:

  Missing map mapping or unsupported mapping mapping type: runtime type - & gt; Feet type system Runtime Type - & gt; Renaissance.Data .FilePoint Destination Path: Project.fitipefitip Source Value: System.Discam  

I am trying to do this. Name match and even if I tell it specifically with the map:

  .mail (dest => dest.fee, opt => opt.MapFrom (Src = & gt; src.Fee))  

This is still the error with the same message

UPDATE < / Strong> This works:

  .mmm (dest = & gt; dest.FyType, Opt => opt.Ignore ());  

I think it's a hack that I need to do this. I should not ignore the property that does not exist / source is not something similar to the property.


No comments:

Post a Comment