How to map Dataset and Typed Dataset using Automapper?
I am trying to assign values from Dataset(Dataset.Table(0)) to a Typed Dataset(XSD) and vice verse. And my dataset.table(0) and type开发者_运维问答d dataset has same structure. I am trying to map between this two using Automapper but i am not getting how to do that one.
It's been a long time since I have used DataSets but isn't this what Merge is for?
myds.Merge( ds );
I think there will be too many properties on the DataTable to have to ignore etc it will be a pain. You would do the mapping from the two datarows not the datasets.
It would be something like
.ForMember( trow => trow.MemberName, o => o.MapFrom( row => row["MemberName"] ) )
You would convert the List of DataRows.
精彩评论