简体   繁体   English

使用数据库在Visual Studio 2010中构建和部署WPF

[英]Build and deploy wpf in visual studio 2010 with database

I know WPF . 我知道WPF I want to start a small WPF App that will interact with database ( SQL Server ). 我想启动一个小型WPF App ,它将与数据库( SQL Server )进行交互。 I know how to develop it locally but I am worried about deployment. 我知道如何在本地开发它,但我担心部署。 Client machine don't have .Net or SQL Server . 客户端计算机没有.NetSQL Server Client OS may be Windows XP or Windows 7 . 客户端操作系统可以是Windows XPWindows 7 What ORM should I use? 我应该使用什么ORM How to add Database in my project? 如何在我的项目中添加Database edmx , service-based databse ?? edmxservice-based databse or something other? 还是其他?

As part of your deployment, you can add .Net framework and SQL server as pre-requisites. 作为部署的一部分,您可以添加.Net Framework和SQL Server作为先决条件。 Either you can bundle the .Net framework installer and SQl installer in your application installer or provide valid web-links to the user from where they can download and install them. 您可以将.Net Framework安装程序和SQl安装程序捆绑在应用程序安装程序中,也可以向用户提供有效的Web链接,使他们可以从中下载并安装它们。

Now regarding ORM, better to go with Entity Framework as you are using SQL server. 现在关于ORM,最好在使用SQL Server时使用Entity Framework。 I would suggest go for code first approach. 我建议去代码优先方法。 Entity framework is a nuget package that you can add reference in your project. 实体框架是一个nuget包,您可以在项目中添加引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM