/// <summary> /// You can add custom Type handlers here for specific mapping. /// Only one mapping can be defined pro type. /// </summary> /// <param name="type">Type of class</param> /// <param name="mapping">mapping definition.</param> public void AddElasticSearchMappingForEntityType(Type type, ElasticsearchMapping mapping) { if (_mappingDefinitions.ContainsKey(type)) { throw new ElasticsearchCrudException("The mapping for this type is already defined."); } _mappingDefinitions.Add(type, mapping); }