Updated IEntityExtensions.WithId() method implementation