public static void Initialize(FluentMapConfiguration config) { config.AddMap(new BrandEntityMap()); config.AddMap(new CategoryEntityMap()); config.AddMap(new ProductEntityMap()); config.AddMap(new ProductCopyEntityMap()); config.AddMap(new ProductImageEntityMap()); }
/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="config"></param> /// <param name="mapping"></param> public static void AddEntityMapping <T>(this FluentMapConfiguration config, IEntityMap <T> mapping) where T : class, IEntity { if (!FluentMapper.EntityMaps.ContainsKey(mapping.GetType())) { config.AddMap(mapping); } }
private void AddMap <TMap, T>(FluentMapConfiguration mapConfiguration) where TMap : DapperMapperBase <T>, new() where T : class { TMap map = new TMap(); mapConfiguration.AddMap(map); }