0

当尝试使用 QueryCache 库对一些实体进行一些 L2 缓存时,我在 .FromCache() 上收到一个编译器错误,表明需要 QueryDeferred 库。文档表明 QueryCache 可以单独使用。

using Z.EntityFramework.Plus;

namespace LookupValuesMap.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            LookupValueContext ctx = new LookupValueContext();
            var companies = ctx.Companies.FromCache().ToList();  <-- error

这是错误:

Error   CS0012  The type 'QueryDeferred<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Z.EntityFramework.Plus.QueryDeferred.EF6, Version=1.6.8.0, Culture=neutral, PublicKeyToken=59b66d028979105b'.

先感谢您!

J肯特

4

1 回答 1

0

免责声明:我是Entity Framework Plus项目的所有者

由于库的构建方式,一些像这样的“独立”功能可能具有 Z.EntityFramework.Plus.QueryDeferred.EF6 要求。

您可以从以下位置下载版本:NuGet

我们最终将修复它,不再需要这种依赖。

于 2017-12-05T14:01:42.720 回答