Revert "Updated code and classes from EF6 update"

This reverts commit 756ca5d586e1d92e3be8d5144968d20a257dbaca.