简体   繁体   English

如何使用EF6在ASP.NET WebForms应用程序中使用tagPrefix ef?

[英]How do I make use of the tagPrefix ef in an ASP.NET WebForms app using EF6?

I'm trying to use an EntityDataSource on an ASP.NET WebForms app I'm writing using VS 2015. I found this post Entity DataSource not working with Entity Framework 6 Upgrade , which is helpful but I've still got an issue. 我正在尝试使用VS 2015在ASP.NET WebForms应用程序上使用EntityDataSource。我发现这篇文章Entity DataSource无法与Entity Framework 6 Upgrade一起使用 ,这很有用,但仍然有问题。 In this case I'm not trying to update an app, I'm creating a new one. 在这种情况下,我不是要更新应用程序,而是要创建一个新的应用程序。 I've already installed the EntityDataSource package from NuGet, exactly as described in the linked post. 我已经从NuGet安装了EntityDataSource软件包,完全如链接文章中所述。 I see that the EntityDataSource has been added to the section of my Web.Config. 我看到EntityDataSource已添加到Web.Config的部分中。 However, when I go inito the HTML view and start typing 但是,当我进入HTML视图并开始输入时

<ef:

VS 2015 doesn't understand what I've typed. VS 2015无法理解我输入的内容。 There's no Intellisense. 没有Intellisense。 So I presume that VS 2015 isn't aware of it as I thought it would be. 因此,我认为VS 2015并没有像我想象的那样意识到这一点。 What more do I have to do? 我还需要做什么?

Well, I don't know why this would make a difference, but today all of a sudden, it works. 好吧,我不知道为什么这会有所作为,但是今天突然间,它起作用了。 Besides being a different day (that can't be why), the only thing I can think of is that I got out of VS 2015 yesterday and got back into it today. 除了有不同的一天(这不可能是为什么)之外,我唯一能想到的就是我昨天离开了VS 2015,今天又回到了它。 Why that would make a difference, I don't know. 我不知道为什么会有所作为。 But it looks like it did. 但是看起来确实如此。

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

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