什么是Microsoft ASP.NET网页2数据的NuGet软件包? [英] What is the Microsoft ASP.NET Web Pages 2 Data Nuget Package for?

查看:150
本文介绍了什么是Microsoft ASP.NET网页2数据的NuGet软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的理解是,我需要一个ASP.NET MVC 4项目的最低的NuGet包是:

I understand that the minimum Nuget packages that I need for an ASP.NET MVC 4 Project are:


  • 微软ASP.NET MVC 4

  • 微软ASP.NET剃刀2

  • 微软ASP.NET网页2

  • Microsoft.Web.Infrastructure

不过,我想知道,你会在下面的包添加到项目?

However I am interested to know, what would the following packages add to the project?


  • 微软ASP.NET网页2数据

  • 微软ASP.NET网页2的Web数据

即。什么这两个包呢?对于这些项目的NuGet的描述是一致的描述,剃刀2包,这是不是太有帮助的。

i.e. What do these two packages do? The description for each of these nuget projects is the same description as Razor 2 package, which isn't too helpful.

推荐答案

后做一些尝试用MVC 4个项目有和没有以下的包

After doing some experimenting with MVC 4 Projects with and without the following packages


  • 微软ASP.NET网页2数据

  • 微软ASP.NET网页2的Web数据

我得出的结论是,的的NuGet软件包描述

I have come to the conclusion that the Nuget Package description of

本软件包包含了ASP.NET网页运行时组件。
  ASP.NET网页和新的Razor语法提供了一个快速,简洁,
  干净,轻量级的方式服务器code。与HTML相结合,创造
  动态Web内容。

This package contains the runtime assemblies for ASP.NET Web Pages. ASP.NET Web Pages and the new Razor syntax provide a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content.

是非常误导的。

微软ASP.NET网页2数据实际上只是包含WebMatrix.Data.dll。这种添加该包时被添加到您的项目中唯一装配。
看着这个组装

The Microsoft ASP.NET Web Pages 2 Data actually just contains the WebMatrix.Data.dll. This the only assembly that is added to your project when adding this package. Looking at the MSDN reference for this assembly

该WebMatrix.Data命名空间包含简化数据库类
  在ASP.NET网页中的互动。此命名空间包括类,
  帮你打开,查询和发送命令到数据库,并努力
  与由SQL查询返回的数据库行。

The WebMatrix.Data namespace contains classes that simplify database interaction in ASP.NET Web Pages. This namespace includes classes that help you to open, query, and send commands to a database, and to work with database rows that are returned by SQL queries.

和Microsoft ASP.NET网页2 Web数据,这个​​包只增加了WebMatrix.DataWeb.dll(取决于WebMatrix.Data.dll)。
该装配的 MSDN参考

And for the Microsoft ASP.NET Web Pages 2 Web Data, this package only adds the WebMatrix.DataWeb.dll (dependent on WebMatrix.Data.dll). The MSDN reference for this assembly is

该WebMatrix.WebData命名空间包含简化类
  会员与安全ASP.NET网页。此命名空间包括
  类,帮助您创建和删除用户帐户,定义角色,
  和管理帐户的密码。

The WebMatrix.WebData namespace contains classes that simplify membership and security in ASP.NET Web Pages. This namespace includes classes that help you create and delete user accounts, define roles, and manage account passwords.

所以,如果不使用WebMatrix的数据来访问数据库,并没有使用简单的成员资格提供程序,这些包都是不必要的。

So if not using WebMatrix Data to access databases and not using the simple membership provider, these packages are unnecessary.

如果您使用的是简单的会员供应商,或延长扩展成员资格提供程序,那么这些包是必要的。

If you are using the Simple Membership provider, or extending the Extended Membership Provider, then these packages are necessary.

这篇关于什么是Microsoft ASP.NET网页2数据的NuGet软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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