コード例 #1
0
 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());
 }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
        private void AddMap <TMap, T>(FluentMapConfiguration mapConfiguration)
            where TMap : DapperMapperBase <T>, new()
            where T : class
        {
            TMap map = new TMap();

            mapConfiguration.AddMap(map);
        }