Switch to Wei's Entity Framework implementation