Tips and Tricks
LINQ to Entities does not recognize ToString
Sometimes LINQ to Entities does not recognize the method "System.String ToString()" and this method cannot be translated into a store expression.
This type of exception frequently occurs when we are working with LINQ or Entity Framework.
According to the preceding syntax, when we convert “status.ToString()”, in the where condition the exception "Expression not found such method in SQL" occurs where the condition returns an IQueryable result. So if we convert the result to IEnumerable, then the preceding type of exception never occurs.