我使用ValueInjecter而不是AutoMapper。我試圖用ValueInjecter:如何在執行.InjectFrom <UnflatLoopValueInjection>(數據)時忽略某些屬性?
.InjectFrom<UnflatLoopValueInjection>(model)
它的工作原理進行unflattening操作,但我也想specity一些屬性unflattening操作過程中忽略,例如寫一樣的東西:
.InjectFrom<UnflatLoopValueInjection>(new IgnoreProperties("Prop1", "Prop2"), model)
或
.InjectFrom<UnflatLoopValueInjection>(model).IgnoreProperties("Prop1", "Prop2")
任何想法?