Fix Entity Framework related functionality.