I'd like to have the following API for my MyTypeRepository
:
var myChosenInstance = _myRepository.FindOne(x => x.MyProperty == "MyValue");
..and for the lambda to use used to construct a linq query within the repository, which is then used by Linq to NHibernate.
Is this possible? What would my repository FindOne method look like?