public void Apply(IIdentityInstance instance) { instance.CustomType<Guid>(); instance.Column("Id"); instance.GeneratedBy.Custom<global::NHibernate.Id.SequenceHiLoGenerator>(); instance.UnsavedValue(Guid.Empty.ToString()); }
public void Apply(IIdentityInstance instance) { instance.CustomType <Guid>(); instance.Column("Id"); instance.GeneratedBy.Custom <global::NHibernate.Id.SequenceHiLoGenerator>(); instance.UnsavedValue(Guid.Empty.ToString()); }
/// <summary> /// Apply convention. /// </summary> /// <param name="instance">Instance convention.</param> public void Apply(IIdentityInstance instance) { //TODO: Review this point after upgrade FluentNHibernate to 1.3 or after instance.CustomType <IdentityType>(); instance.Access.LowerCaseField(); instance.UnsavedValue("null"); instance.GeneratedBy.Assigned(); }
public void Apply(IIdentityInstance instance) { var propertyType = instance.Type.GetUnderlyingSystemType(); var identityUserType = this.GetUserType(propertyType); if (identityUserType == null) { return; } instance.CustomType(identityUserType); }
public void Apply(IIdentityInstance instance) { var systemType = instance.Type.GetUnderlyingSystemType(); if (systemType is null) { return; } var isStrongType = StrongTypeIdHelper.IsStrongTypeId(systemType); if (isStrongType) { var customType = typeof(NHStrongTypeIdUserType <>).MakeGenericType(systemType); instance.CustomType(customType); } }
public void Apply(IIdentityInstance instance) { instance.CustomType<int>(); instance.GeneratedBy.Identity(); }