Monday, 19 December 2011

LINQ query

  var matchRec = (from v in properties
                            where v.CorpProp == corpProp
                            select v).FirstOrDefault();


 var result = (from p in AllUCConfig
                          where p.ConfigCode == code
                          select new
                          {
                              ConfigValue = p.ConfigValue1
                          }).FirstOrDefault();
            return result == null ? String.Empty : result.ConfigValue;

No comments:

Post a Comment