Hi Guys,
How to save data with 1 to many relationship in Asp.Net Core Mvc
I'm trying to save data with 1 to many relationship but I'm confused with how to show data in view before save.
For example I have 3 tables :
1. tbl_Student
2. tbl_Book
2. tbl_Rent
When 1 student rent more than 1 book it can be save one time. The scnario data like in table below :
RentCode |
StudentID |
StudentName |
BookID |
BookName |
RNT00001 |
STN00001 |
Andi |
BOOK000001 |
BOOK A |
|
|
|
BOOK000002 |
BOOK B |
|
|
|
BOOK000003 |
BOOK C |
|
|
|
BOOK000004 |
BOOK D |
|
|
|
BOOK000005 |
BOOK E |
and soon.
How to save the data above ???
Please guide me, may be any link refrence for learn.
Any help could be much apriciate.