Monday, 15 February 2010

c# - Compare char in linq -


How can I compare a char value in linq, what I am doing is not working, someone me Can tell me what is wrong in my code my column

public four marketing types {get; Set; }

and column size 1 in the database

  public list & lt; Marketing & gt; MarketWatch {Get; Set; } Var debs = iMarketingService.GetMarketingContents () Select s; See Modell Marketing. MarkVideo = Database. Where (t = & gt; t marketing type == 'V'). ToList (); Condition above  

is not working and showing me the empty list, but when I compare it to other integer type columns like below it is working fine for me .

 See  Module Marketing. Market Videos = Dubs Where (t => t.dhdby == 2) .Oolist ();  

Any suggestions, or help would be appreciated. Thanks

I think four 1 is a string of length.

So you can call it

  public string marketing type {get; Set; }  

and your position should be

  debs.Where (t = & gt; T. Marketing Typ. Ecloss ("v")). ToList ();  

No comments:

Post a Comment