c# - Ignore a property in AutoMapper? -


i'm using automapper copy 1 object properties other , later update in database using ef.

question how tell automapper copy every property ignore particular property (in case id). i'm new automapper , have done code. don't have other configurations or use of automap in project.

mapper.map(lead, existinglead); 

i have downloaded automapper form here https://github.com/automapper/automapper

on mapper.createmap<type1, type2>() can use either

.forsourcemember(x => x.id, opt => opt.ignore()) 

or

.formember(x => x.id, opt => opt.ignore()) 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -