Я не понимаю, почему этот запрос не выполняется.
var qTags = from tagsU in _context.ADN_ProductTagsView
where !(from o in _context.ADN_ProductTagsView
where o.ProductID == productId
select o.ProductTagID).Contains(tagsU.ProductTagID)
select tagsU;
Или вот этот:
var tagAux = from o in _context.ADN_ProductTagsView
where o.ProductID == productId
select o.ProductTagID;
var qTags = from tagus in _context.ADN_ProductTagsView
where !tagAux.Contains(tagus.ProductTagID)
select tagus ;
Оба дают мне эту ошибку:
LINQ to Entities does not recognize the method 'Boolean Contains[Int32](System.Linq.IQueryable`1[System.Int32], Int32)' method, and this method cannot be translated into a store expression.
Кто-нибудь может мне помочь?