如何在MVC中的数据库中插入文本框值 [英] how to insert textbox values in database in MVC

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

问题描述



i全新的mvc,



i希望使用带编码的mvc在数据库中插入记录。



如何编写数据库连接编码并从控件中插入数据库中的记录。



如何插入文本框,下拉列表等..控制MVC数据库中的值



请帮帮我..


i am totly new in mvc,

i want to insert records in database using mvc with coding.

how to write database connection coding and insert records in database from controls.

how to insert textbox, dropdownlist,etc..controls values in database in MVC

please help me..

推荐答案

如果你想使用 MVC 模式为您的数据库项目,然后最好使用 ORM Object-relational mapping )。而目前Entity Framework是非常受欢迎的ORM。但它支持.Net框架中的MVC 3及以上版本。



请先阅读本文。这将为您提供有关实体框架的基本概念 -



绝对初学者实体框架简介
If you want to use MVC pattern for your databse project then mostly preferable to use is ORM(Object-relational mapping). And in currently Entity Framework is very popular ORM. But it supports MVC 3 and above version in .Net framework.

Please read this article first. This will give you basic idea about Entity Framework -

An Introduction to Entity Framework for Absolute Beginners


参考



使用实体框架5在MVC 4中完成CRUD操作而无需编写单行代码 [ ^ ]





http://www.asp.net/mvc/tutorials/getting-started -with-ef-using-mvc / implementation-basic-crud-functions-with-the-entity-framework-in-asp-net-mvc-application [ ^ ]
Refer

Complete CRUD Operations in MVC 4 using Entity Framework 5 Without Writing a Single Line of Code[^]


http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application[^]


这篇关于如何在MVC中的数据库中插入文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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