Click here to Skip to main content
15,908,906 members

Comments by ConXioN (Top 1 by date)

ConXioN 10-Oct-11 6:41am View    
I do currently pass ID into the DAL. Just looking for alternatives. So, instead of having a repository with multiple methods for different scenarios, you could do queries against Entities like so: UserRepository.Get(u => u.ID == model.userId).Single() and alternatively UserRepository.Get(u => u.Username == model.userName).

Thanks for the Google hint, I found something that seems to fit the picture: http://vincentlauzon.wordpress.com/2011/06/25/expression-trees-part-4-simple-mapping-inversion/

At least something to look at.