Improve code portability from EF to RavenDB