I have a linq query in which I want to include those entries that are not null or empty in the database field, but when I use string.isNullorEmpty this gives me an error. How can I achieve this task, my request
from post in PostIdPostMeta1
join pstmt in postrepository.GetAllPostMetas() on post.int_PostId equals pstmt.int_PostId
where string.IsNullOrEmpty(pstmt.vcr_MetaValue) == false
select post
If I change string.IsNullOrEmpty (pstmt.vcr_MetaValue) == false to pstmt.vcr_MetaValue! = String.Empty , it allows me to SQL Server not handle NText, Text, Xml or Image type comparison
source
share