如何在asp.net的MVC架构中插入,更新,删除数据库中的数据 [英] How to insert,update,delete data in database in MVC architecture in asp.net

查看:156
本文介绍了如何在asp.net的MVC架构中插入,更新,删除数据库中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp.net中的MVC架构中插入,更新,删除数据库中的数据

How to insert,update,delete data in database in MVC architecture in asp.net

推荐答案

这是一个通用的问题,所以我要给一个通用答案。 ASP.NET MVC有许多方法可以对数据库执行CRUD操作。最简单的方法之一是使用Entity Framework。甚至无需编写代码,您可以连接到数据库并创建模型。从那里,您可以使用MVC内置的脚手架为您创建执行CRUD操作的页面。



这是ScottGu关于使用MVC4的精彩演讲。其中包括如何进行CRUD操作的演示: http://weblogs.asp.net/scottgu/archive/2012/02/19/asp-net-mvc-4-beta.aspx [ ^ ]
This is a generic question, so I am going to give a generic answer. ASP.NET MVC has a number of ways to perform CRUD operations against a database. One of the easiest methods is to use Entity Framework. Without even writing code, you can hook up to your database and create your models. From there, you can use the scaffolding built into MVC to create the pages for you that do the CRUD operations.

Here is a great talk by ScottGu on using MVC4. Included in there is a demo of how to do CRUD operations: http://weblogs.asp.net/scottgu/archive/2012/02/19/asp-net-mvc-4-beta.aspx[^]


这是一篇关于MVC中插入删除和更新操作的文章

http://www.c-sharpcorner.com/UploadFile/krishnasarala/select-insert-update-and-delete-with-Asp-Net-mvc [ ^ ]



这个..
Here is an article for insert delete and update operations in MVC
http://www.c-sharpcorner.com/UploadFile/krishnasarala/select-insert-update-and-delete-with-Asp-Net-mvc[^]

This this..


请参考:

使用MVC的ASP.NET应用程序开发 [ ^ ]

ASP.Net MVC框架中的CRUD操作 [ ^ ]

CRUD(创建/插入/更新/删除)。净实体数据模型 [ ^ ]
Please refer:
ASP.NET Application Development Using MVC[^]
CRUD Operation in ASP.Net MVC Framework[^]
CRUD(Create/Insert/Update/Delete) with Asp.net MVC Framework, ADO.Net Entity Data Model[^]


这篇关于如何在asp.net的MVC架构中插入,更新,删除数据库中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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