After some struggle with Entity Framework (see my previous post) I am now explicitly initializing entity properties. I've found an old post with description of TypeMappings, but it seems to be an old syntax, and recent AutoFixture versions use Customize<T>
So I wanted to customize type creation:
.With(x => x.EntityId, Guid.NewGuid().ToString()));
Now if I call fixture.CreateAnonymous<MyEntity>() I will get an instance of MyEntity with properly initialized EntityId. But I will get same EntityId also next time - since Guid generator is passed not as a labmda expression but as a generated value,
the same value is used every time my test asks about MyEntity instance.
How can I modify the code above to enable generation of anonymous MyEntity instances with different EntityIds?