You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to do a dynamic field search, so I need to convert all the fields to string for global search, like below:
var expectedResult = _context.Blogs.Select(b => ((string)((int)(b.BlogId))).Contains("key")); var result = _context.Blogs.AsQueryable().Select("(string((int)BlogId)).Contains(@p)");
but I know that doesn't work, so is there another way I can do ?
Thanks!
The text was updated successfully, but these errors were encountered:
Oh, sorry, I have solved this issue, it just can use ToString() for convert to string as below:
var expectedResult = _context.Blogs.Select(b => ((int)(b.BlogId)).ToString().Contains("aa"));
var result = _context.Blogs.AsQueryable().Select("(int(BlogId)).ToString().Contains(\"aa\")");
but I don't know why the ToString() can't use to format a DateTime value ( My another issue)
I want to do a dynamic field search, so I need to convert all the fields to string for global search, like below:
var expectedResult = _context.Blogs.Select(b => ((string)((int)(b.BlogId))).Contains("key"));
var result = _context.Blogs.AsQueryable().Select("(string((int)BlogId)).Contains(@p)");
but I know that doesn't work, so is there another way I can do ?
Thanks!
The text was updated successfully, but these errors were encountered: