当尝试使用 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肯特