Is Autofixture capable of creating an entity depending upon the mapping configuration done using EF fluent API? I am looking more specifically where a string has a certain length been configured but Autofixutre is generating string with longer length.
-- Updated question -- Let's take an example of a User entity with UserName property whose length is fixed to 8 character. The configuration of UserName Property is done using EF Fluent API, something like this:
modelBuilder.Entity<User>().Property(t => t.UserName).HasMaxLength(8);
Now when I instantiate User entity using Autofixture it gives me a string of UserName with longer than 8. This will trigger an exception while trying to save this entity into db. There are lot of properties with different configuration, which is preventing me to take the full benefit of using Autofixture.