updates to entity framework code