Fix up Entity Framework queries and dbContext for Preview.