Faysal Chowdhury

Faysal Chowdhury

  • NA
  • 31
  • 7.3k

How to insert multiple table data using ViewModel in asp.net

Mar 9 2019 11:00 AM
Hi there,
I am new in ap.net mvc. I want to insert, update and delete multiple tables data in a single form using the ViewModel in asp.net mvc. I have created five tables with relation each other, which given below in the image.
 
Then I've created five models usign code first from database approch. After that I'm trying to create ViewModel but I can't understand how to create and bind all the tables for my App.
My app form table for insert, Update, Delete data like this:
 FirstName InputBox
 MiddleName InputBox
 LastName InputBox
 DateOfBirth InputBox
 Gender InputBox
 ProfessionDropDown Value
 BloodGroup DropDown Value
 UserNameDropDown Value
 MobileNumber InputBox
 
Please anybody help me to resolve this issue.
 
Thanks

Answers (2)