When you create a criteria, you can add Restrictions that apply to a property. There are 2 ways of creating a Restriction:
Restrictions.Eq(string propertyName, object value)
or
Restrictions.Eq(IProjection projection, object value)
Thing is, I don't feel comfortable passing property names as strings, since if they ever change, my project will compile as usual and any possible naming mismatch will only be found during unit testing. I'm trying to implement TDD but it won't happen anytime soon, so I'm trying to limit dependencies of unit testing to check for errors (until we manage to embrace TDD).
Any ideas? Thanks in advance!