Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

automapper example for ado.net to viewmodel mapping

i have not used automapper before, is there a link with a sample of how to map dataset rows to a asp.net mvc 2 viewmodel ?

like image 613
user603007 Avatar asked Jan 27 '26 16:01

user603007


1 Answers

AutoMapper doesn't excel in mapping between non strongly typed dataset rows and view models. Here's what I would suggest you: use an ORM to map between your SQL tables and a model and then AutoMapper to map between the model and the view model. Another advantage is that you would get rid of the datasets as well.

like image 83
Darin Dimitrov Avatar answered Jan 30 '26 06:01

Darin Dimitrov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!