Friday, December 28, 2012

Using ConvertAll in Generic List


var result = Context.User.Where(p => p.ID == UserID && p.Withdrawal == null).Select(c=>c.Deposit).ToList().ConvertAll<decimal>(x=>Convert.ToDecimal(x)).Sum(c => c);
 

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software