当尝试使用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·肯特
发布于 2017-12-05 22:01:43
免责声明:我是Entity Framework Plus项目的所有者
由于库的构建方式,像这样的一些“独立”功能可能会有Z.EntityFramework.Plus.QueryDeferred.EF6要求。
您可以从以下位置下载该版本:NuGet
我们最终将修复它,使其不再具有这种依赖性。
https://stackoverflow.com/questions/47644586
复制相似问题