Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a view in my database created from two tables. How do i use this view in my mvc4 project to create its services to access the fields of the view???
Please help...
Posted

1 solution

MVC comes with Entity Framework, which allows you to query and save to database.

There are three ways to get your work done using Entity Framework. Database First, Model First, and Code First.

Here is the Getting started with EF using mvc

Hope it gets you started quickly to learn using Entity Framework.

You can also work with the Stored Proceedures and Views once you setup the .edmx file in your application

Edit

You can also use ado.net in combination of mvc. Here is a link that gets you started if you are new to it Accessing and Updating Data in ASP.NET
 
Share this answer
 
v3
Comments
scarletwitch1990 18-Mar-13 7:33am    
but i dont have an .edmx file...instead i am accessing the database using connection string
Karthik Chintala 18-Mar-13 8:38am    
You can also use ado.net in combination of mvc. Here is a link that gets you started if you are new to it Accessing and Updating Data in ASP.NET
scarletwitch1990 18-Mar-13 23:59pm    
can you post the above comment as a solution???
Karthik Chintala 19-Mar-13 0:03am    
I didnt get you @sarahalex. do you want me to edit the post ?
scarletwitch1990 19-Mar-13 6:39am    
@Kartik: no post it as a solution so i can mark it...the link was indeed helpful

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900