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

Sachin SinghRank #66 · 26.2K reputationPosted Oct 16, 2020, 5:00 AM EDT
Kiran MohantyRank #821 · 2.8K reputationPosted Oct 16, 2020, 5:01 AM EDT
Schleid AlexRank #3,087 · 464 reputationPosted Oct 16, 2020, 5:19 AM EDT
Ravi PatelRank #439 · 5.7K reputationPosted Oct 16, 2020, 7:42 PM EDT
Varun SetiaRank #308 · 8.2K reputationPosted Oct 17, 2020, 8:24 AM EDT