如何针对在Visual Studio中看不到的数据库进行编程?

时间:2022-01-07 21:07:44

I'm writings some ASP.NET and I tried connecting to my MySQL database. I found out GoDaddy doesn't support remote connecting to the database (free hosting). Is there a way to program against it? Maybe prototyping the database locally?

我正在写一些ASP.NET,我尝试连接到我的MySQL数据库。我发现GoDaddy不支持远程连接数据库(免费托管)。有没有办法对它进行编程?也许在本地对数据库进行原型设计?

3 个解决方案

#1


Setting up a local MySQL database to develop against would seem the easiest solution.

设置本地MySQL数据库进行开发似乎是最简单的解决方案。

#2


A mock data layer would work and give testing benefits as well. Rhino.Mocks for instance.

模拟数据层也可以工作并提供测试优势。例如Rhino.Mocks。

#3


I always use unbound controls so I've never run into that problem. That would be one option.

我总是使用未绑定的控件,所以我从来没有遇到过这个问题。这将是一种选择。

Another would be to have a "widget" class sit between your data and your program. During development, have the widget return what you expect. During testing and release, have the widget return real data.

另一种方法是在您的数据和程序之间放置一个“小部件”类。在开发期间,让窗口小部件返回您期望的内容。在测试和发布期间,让小部件返回实际数据。

#1


Setting up a local MySQL database to develop against would seem the easiest solution.

设置本地MySQL数据库进行开发似乎是最简单的解决方案。

#2


A mock data layer would work and give testing benefits as well. Rhino.Mocks for instance.

模拟数据层也可以工作并提供测试优势。例如Rhino.Mocks。

#3


I always use unbound controls so I've never run into that problem. That would be one option.

我总是使用未绑定的控件,所以我从来没有遇到过这个问题。这将是一种选择。

Another would be to have a "widget" class sit between your data and your program. During development, have the widget return what you expect. During testing and release, have the widget return real data.

另一种方法是在您的数据和程序之间放置一个“小部件”类。在开发期间,让窗口小部件返回您期望的内容。在测试和发布期间,让小部件返回实际数据。