如何使用ado.net和3tier arch在asp.net mvc5中保存多个表单 [英] How to save multiple form in asp.net mvc5 using ado.net and 3tier arch

查看:60
本文介绍了如何使用ado.net和3tier arch在asp.net mvc5中保存多个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好朋友我是Asp.Net MVC5的新手我需要知道如何使用 ADO.NET 3tier 架构将多个表单保存到数据库中。如何做到这一点,请帮我查询相关链接。

Hello Friends I am new to Asp.Net MVC5 i need know how to save the multiple forms into database using ADO.NET and 3tier architecture.How to do this,please assist me with related links.

推荐答案

MVC是Web前端架构。 View是用户将使用的屏幕。 Model是一个类,其对象将用于表示应用程序中的数据。控制器处理用户交互并充当粘合剂,将视图和模型保持在一起。



在您的情况下,用户请求将来到Controller。然后,Controller对象将通过Model中的方法或单独的类(业务)验证模型。然后它将被发送到将执行数据库操作的数据访问层。您可以为正在使用的数据库使用合适的提供程序。例如,SqlConnection和其他用于执行数据库操作的相关类。您可以参考MSDN或搜索CodeProject获取更多详细信息。



这里 [ ^ ]可以帮助您入门。
MVC is web front end architecture. View is the screen that user will use. Model is the class whose object will be used to represent data in the application. Controller is what handles user interaction and acts as glue that holds view and model together.

In your case, user request will come to Controller. Controller object will then validate the model through methods in Model or in a separate class (business). Then it will be sent to data access layer which will perform the database operations. You can make use of a suitable provider for the database you are using. For instance SqlConnection and other related classes for performing database operations. You can refer to MSDN or search CodeProject for articles for more details.

Here[^] is something to get you started.


这篇关于如何使用ado.net和3tier arch在asp.net mvc5中保存多个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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