c# - How in Linq to entity replace true or false with On or Off? -


i need bind grid linq entity(asp c#), when im binding need replace true or false on or off. how can accomplish it?

ex.

var t = k in entity.table select k.isactive; 

so in result if

isactive == true need return on
isactive == false need return off

var t = k in entity.table select k.isactive ? "on" : "off"; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -