In here i want to, If AvailCode comes as a null or empty string then i need to show it "Temporary Unavailable".But my coding doen't show that one. (Consider only Avail Code).
var _staff = trv.GetBookDetails("4500").Select(b => new
{
value = b.bookno,
text = b.bookname + " " + "/"+" " + b.AvailCode ?? "TemporaryUnavailable",
});
text = String.Format("{0} / {1}", b.bookname, String.IsNullOrEmpty(b.AvailCode) ? "TemporaryUnavailable" : b.AvailCode);