I have two objects such as A : B
I want to copy all values from A to B at run time
Code
Cow cow = db.Cows.Find(id);
CowDetailViewModel model = new CowDetailViewModel(); // CowDetailViewModel : Cow
I want to copy value from cow variable to model. there are additional properties in CowDetailViewModel which i would change after copying values.