AutoBogus
AutoBogus copied to clipboard
Feature: skipping members should also work for inherited interfaces
I want to request a feature which allows you to declare members to skip of an interface. When a class inherits from that interface, the specified members to skip will also affect the class.
Code:
//Skip members by interface
AutoFaker.Configure(builder =>
{
builder.WithSkip<IEntityBase>(x => x.CreatedBy);
}
//Instead of by class:
AutoFaker.Configure(builder =>
{
builder
.WithSkip<EntityFoo>(x => x.CreatedBy)
.WithSkip<EntityBar>(x => x.CreatedBy)
.WithSkip<EntityOther>(x => x.CreatedBy);
}
I will submit a PR for this