I want to create a "Create view" to enter information for both employee and address from a single page... I have my employemodel and my addressmodel. I am creating an EmployeeViewModel like this
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace gpos.Models
- {
- public class EmployeeViewModel
- {
- public EmployeeModel NewEmployeViewModel { get; set; }
- public AddressModel NewAddressViewModel { get; set; }
- }
- }
now in my controller create action I want to generate a view to show data from both employee and address... I know I must use the viewModel but still not clear for me. I would really appreciate some help, tutorial reference...
Thank you so much