Changes to Index and added entityframework