EF SQL Server repository + refactoring including tests