C# Mapper Code

  1. Mapping ViewModel with Model.
  2. Make sure your viewmodel fields are named just like fields in model.
  3. EditMerchants (ViewModel)
  4. TsMerchants (Model)
  5. Downloaded via NuGet  - http://automapper.codeplex.com/
Mapper.CreateMap();
TsMerchant e = Mapper.Map(model);