如何访问视图 [英] How to access a view

查看:86
本文介绍了如何访问视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在从两个表创建的数据库中有一个视图。如何在我的mvc4项目中使用此视图来创建其服务以访问视图的字段???

请帮助...

解决方案

MVC附带了Entity Framework,它允许您查询并保存到数据库。



有三种方法可以使用Entity Framework完成工作。 数据库优先模型优先代码优先



这是使用mvc开始使用EF



希望它能让你快速学习使用Entity Framework。



在应用程序中设置.edmx文件后,您还可以使用存储过程视图



编辑



您也可以将ado.net与mvc结合使用。如果您不熟悉,可以使用以下链接访问并在ASP.NET中更新数据

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...

解决方案

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


这篇关于如何访问视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆