I m new to .NET. I m trying to do something very simple. I would like to perform a search on a Model in my controller and retrieve the first entity returned :
var cercueils = from y in db.Cercueils select y;
cercueils = cercueils.Where(z => z.Type.ToUpper().Contains(dr[13].ToUpper())
|| z.AncienType.ToUpper().Contains(dr[13].ToUpper()));
Cercueil cercueil = cercueils.First();
But this is not good, as it throws an error :
Le type de nœud « ArrayIndex » de l expression LINQ n est pas pris en charge dans LINQ to Entities.
页: 1
我如何能够做到这一点?
感谢您的帮助。