TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark Tabor
586
2k
464.4k
How to save multiple rows into the database in mvc
Dec 28 2019 7:56 AM
hi I have a form in which i have two dropdownlist and two textboxes , these dropdownlist having multiselect options as well , Now i want to save multiple rows for them just see below.
you can see i have selected two teachers and two coruses i want to save four rows into the database like first two rows for the first teacher (For two courses ) and last two rows for the second teachers ( for two courses)
how to achieve it , i am sharing my model class as well I have not taken courses and teacher as list insted i took them as normal int type .
public int? Course_Id { get; set; }
public int? Teacher_Id { get; set; }
Reply
Answers (
8
)
How to add one column in Gridview
Store Device token getting from HTTPPost web api method