/// <summary> /// Applies any conventions required for the ID property. /// </summary> /// <param name="map"> The ID mapper. </param> /// <param name="property"> The ID property. </param> protected virtual void ApplyIdConventions(IIdMapper map, PropertyInfo property) { if (property.PropertyType == typeof(int) || property.PropertyType == typeof(long)) { map.Generator(Generators.HighLow, g => g.Params(new { max_lo = 100 })); } else if (property.PropertyType == typeof(Guid)) { map.Generator(Generators.GuidComb); } }
private void ClassMappings(IIdMapper mapper) { mapper.Generator(Generators.Identity); mapper.UnsavedValue(-1); }