vendredi 22 mars 2019

what else can i use for automapper in c#?

I have two classes named RegistrationModel and UserModel in a class library called DomainLayer. Registration model and UserModel have a few properties in which the properties of RegistrationModel are read and set.

Now I have a List of UserModel type in a different class library called RepoLayer.

List<DomainLayer.UserModel> user = new List<UserModel>();

Now I need to set all the properties of RegistrationModel to UserModel using a generic mapper in RepoLayer and add those into the list and return the list back to the PresentationLayer.

Now for that i can use an automapper which solves my problem within a minutes but i need to implement the the functionality of an automapper by using a generic class. How do i Do that?





Aucun commentaire:

Enregistrer un commentaire