SimplePatch
SimplePatch copied to clipboard
Support for init config from assembly by typed class configuration
when entities are made with code generator, is more easy decor properties with attributes than make a fluent config, so I added a exclude attribute to decor properties.
to decouple the configuration of each entity and avoid adding each entity at init, it is now possible to create configuration files in Entity Framework style, so you only need specify the assembly that you want SimplePatch scan and config for you, base on your config files
Startup
var assembly = typeof(Person).Assembly;
DeltaConfig.InitFromAssembly(cfg => {
cfg.AddAssembly(assembly);
});
Config file
public class PersonConfiguration : Mapping.IEntityTypeConfiguration<Person>
{
public void Configuration(DeltaConfig.EntityConfig<Person> entityConfig)
{
entityConfig.Property(x => x.AgeExcludeByMapping).Exclude();
}
}
@OmarMuscatello any comments?