For example; if we have this error "LINQ to Entities does not recognize the method 'Int64 ToInt64(System.String)' method, and this method cannot be translated into a store expression." because of the code below:
query = query.Where(x => x.StudentId.Value == Convert.ToInt64(number));then we can try to do as below:
long value = Convert.ToInt64(number); query = query.Where(x => x.StudentId.Value == value);
No comments:
Post a Comment