如何在MVC视图中进行批量插入? [英] How to do bulk insert in MVC view?

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

问题描述

我的项目中有一个管理面板,我在其中使用文本框输入数据。它工作正常,但我想插入大量数据,如不同类别的问题。如果还有其他方法可以帮我告诉我吗?无论如何使用excel表或类似的东西?

解决方案

批量插入,因为所有其他数据库问题,并不是MVC特有的。您只需要学习如何使用ADO.NET。对于批量操作的问题,请阅读相应的MSDN文章:

http://msdn.microsoft.com/en-us/library/vstudio/1y8tb169%28v=vs.100%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us /library/s4s223c6%28v=vs.110%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/aadf8fk2​​%28v=vs.110%29.aspx [ ^ ]。



依旧......: http://bit.ly/1nhWUDZ [ ^ ]。



此CodeProject文章也很有用:多种方式进行多次插入 [ ^ ]。



-SA

I have an admin panel in my project in which I am using text boxes for entering data. It's working fine but I want to insert bulk data such as questions of different category. Would you please tell me if there is any other way to do the task ? anyway to use excel sheet or something like that ?

解决方案

Bulk insert, as all other database problems, is nothing specific to MVC. You just need to learn how to work with ADO.NET. For the problem of bulk operations, please read appropriate MSDN articles:
http://msdn.microsoft.com/en-us/library/vstudio/1y8tb169%28v=vs.100%29.aspx[^],
http://msdn.microsoft.com/en-us/library/s4s223c6%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/aadf8fk2%28v=vs.110%29.aspx[^].

And so on…: http://bit.ly/1nhWUDZ[^].

This CodeProject article can also be useful: Multiple Ways to do Multiple Inserts[^].

—SA


这篇关于如何在MVC视图中进行批量插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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