fixed EF error by setting IoC container to provide the PartyContext as a singleton