private void AddOverride <T>(AutoPersistenceModel model, Type entity, IAutoMappingOverride <T> mappingOverride) { model.AddOverride(entity, x => { if (x is AutoMapping <T> ) { mappingOverride.Override((AutoMapping <T>)x); } }); }
//called reflectively from method above private void OverrideHelper <T>(AutoMapping <T> x, IAutoMappingOverride <T> mappingOverride) { mappingOverride.Override(x); }