Extract common entity creation from repo