LINQ member expression getting column name
问题 Hello, I am using LINQ and EF with C# 4.0. I have dragged the basic ELMAH table into EF (built and saved many many times). All is working as one would expect. But have tried to be too ambitious and need a little help - I am trying to get the Column name from an expression that is passed in as a variable. What I want is this: Pass in : x=>x.ErrorId and get : "ErrorId" public void GetColumnName(Expression<Func<T, object>> property) { // The parameter passed in x=>x.Message // Message works fine