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
jeevan
NA
8
14.8k
How to use multiple model classes in one controller in MVC?
Jan 13 2014 9:44 AM
Hi,
According to my requirement, i have created Model classes like Blocks,Slabs,CustDetails, CustFeedback, CustOrders classes .
Next i created context class for them.
Now i want to use all these classes in Home Controller.Is it possible?
Should i use multiple controllers for them?
Till now i know how to work with single model class in controller.Please suggest
My project is as given below.
There will be login page.
If Admin logged in ,then he can view total blocks and slabs.He can insert,update,delete blocks and slabs.He can view customers orders.He can view customer feedbacks.
If Customers logged in ,then he can view all blocks and slabs available.He can send an order to buy any desired block or slab .He can send feedback or complaints to admin.
My Database tables are:
Blocks,Slabs,CustDetails, CustFeedback, CustOrders .
I created model classes and context classes for them.How to use them in my Home controller.
Generally for single model class ,we do as below while creating controller
Controller Name: Home
Model Class: Block
Data Context Class: MyBlock
then how to do with multiple model classes? Please give me suggestions
Reply
Answers (
1
)
asp.net interview questions ?
I am looking for a code in javascript that ensures future da