2011-02-25 224 views

回答

2
var query = from pi in context.PolicyInterval 
      let IsForReplication = pi.IsForReplication ? "Yes" : "No" 
      select new 
      { 
       IsForReplication, 
       PolicyInterval = pi, 
      }; 
0
var result = PolicyInterval.Select(entry => new {IsForReplication = entry.IsForReplication.Equals(1).ToString(), data = entry});