I want to use like type operator in linq to sql, i used contains method to achieve it, but it is case sensitive, suggest me something.
The contains method is case sensitive but I want my query to be case insensitive . I tried to use IndexOf()
method also but it is giving exception.
public static List<string> GetDecodedStaticMsg(string filterMsg)
{
try
{
var q1 = (from decodemsg in Em.StaticMessages
where decodemsg.Message.Contains(filterMsg)
select
decodemsg.MessageId
).ToList();
return q1;
}
catch (Exception)
{
return null;
}
}