[英]Visual Studio 2013 Server Explorer custom data provider: MongoDB
Is there any way to add MongoDB as a custom data provider in Visual Studio 2013 Ultimate? 有没有办法在Visual Studio 2013 Ultimate中添加MongoDB作为自定义数据提供程序?
Server Explorer / Connect to Database Server Explorer /连接数据库
I have installed the latest MongoDB C# driver. 我安装了最新的MongoDB C#驱动程序。
There are two APIs to be found on the network, both of them implements the ODBC standard: 在网络上有两个API,它们都实现了ODBC标准:
After downloading and installing the connector, one must perform a setup with the provided administrator tool, as shown in the following picture. 下载并安装连接器后,必须使用提供的管理员工具执行设置,如下图所示。
After testing the connection in the ODBC Data Source Administrator , one should head over to the Visual Studio's interface, where the Database Connection setup is. 在ODBC数据源管理器中测试连接后,应该转到Visual Studio的数据库连接设置界面。 One must choose the .NET Framework Data Provider for ODBC as a data provider, and the Simba connector will be available, as the following picture shows: 必须选择用于ODBC的.NET Framework数据提供程序作为数据提供程序,并且Simba连接器将可用,如下图所示:
That's all! 就这样!
Another ODBC driver was recently released that can be used here. 最近发布了另一个可以在这里使用的ODBC驱动程序。 It has a unique feature in that it exposes the nested MongoDB data model as a set of relational tables. 它具有一个独特的功能,它将嵌套的MongoDB数据模型公开为一组关系表。 As a result, the interaction with "relationally" minded apps like Visual Studio will be drastically improved: 因此,与Visual Studio等“关系型”应用程序的交互将得到显着改善:
http://www.progress.com/products/datadirect-connect/odbc-drivers/data-sources/mongodb http://www.progress.com/products/datadirect-connect/odbc-drivers/data-sources/mongodb
You should add the references to the MongoDB driver to your project. 您应该将MongoDB驱动程序的引用添加到项目中。 You can do this by right clicking on your project in the solution explorer. 您可以通过右键单击解决方案资源管理器中的项目来执行此操作。 And then click Add Reference. 然后单击“添加引用”。 Then you can locate the dlls from the MongoDB Driver. 然后,您可以从MongoDB驱动程序中找到dll。 After that you can use them in code. 之后,您可以在代码中使用它们。
Source: http://msdn.microsoft.com/en-us/library/wkze6zky.aspx http://www.drdobbs.com/database/mongodb-with-c/240151668?pgno=2 来源: http : //msdn.microsoft.com/en-us/library/wkze6zky.aspx http://www.drdobbs.com/database/mongodb-with-c/240151668?pgno=2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.