Fixed build error with new EF api.