How to turn this Func into an expression?
问题 I am playing around with expression trees and trying to better understand how they work. I wrote some sample code that I'm working with and hopefully someone can help me out. So I have this somewhat messy query: /// <summary> /// Retrieves the total number of messages for the user. /// </summary> /// <param name="username">The name of the user.</param> /// <param name="sent">True if retrieving the number of messages sent.</param> /// <returns>The total number of messages.</returns> public int