selectbykey

How does SelectByKey work in the Repository Pattern?

Hi, I'm implementing the repository pattern found here Implementing Repository Pattern With Entity Framework One of the methods he has is SelectByKey. In the comment called Key field impementation by [email protected], there was a suggestion to make it a little more generic of an implementation: I would like to add a simple mechani...

Binary Operator Equal is not defined... troubles comparing MemberExpressions in a generic repository

I have a generic SelectAllByKey method in my repository: public IList<E> SelectAllByKey(string columnName, string key) { KeyProperty = columnName; Expression rightExpr = null; rightExpr = Expression.Constant(key); // First we define the parameter that we are going to use the clause. var ...