Sources/Infrastructure/Assemblers/IdentityUserAssembler.cs
/// <summary>
/// assemble from identity user to dynamic parameters
/// </summary>
/// <param name="identityUser">identity user object</param>
/// <returns>dynamic parameters</returns>
assemble from identity user to dynamic parameters
assemble from identity user to dynamic parameters
internal static DynamicParameters ToDynamicParameters(this User identityUser)
        {
            if (identityUser == null)
            {
                return null;
            }
            DynamicParameters dynamicParameters = new DynamicParameters();
            dynamicParameters.Add("@UserName", identityUser.UserName);
            dynamicParameters.Add("@NormalizedUserName", identityUser.NormalizedUserName);
            dynamicParameters.Add("@Email", identityUser.Email);
            dynamicParameters.Add("@NormalizedEmail", identityUser.NormalizedEmail);
            dynamicParameters.Add("@EmailConfirmed", identityUser.EmailConfirmed);
            dynamicParameters.Add("@PasswordHash", identityUser.PasswordHash);
            dynamicParameters.Add("@SecurityStamp", identityUser.SecurityStamp);
            dynamicParameters.Add("@ConcurrencyStamp", identityUser.ConcurrencyStamp);
            dynamicParameters.Add("@PhoneNumber", identityUser.PhoneNumber);
            dynamicParameters.Add("@PhoneNumberConfirmed", identityUser.PhoneNumberConfirmed);
            dynamicParameters.Add("@TwoFactorEnabled", identityUser.TwoFactorEnabled);
            dynamicParameters.Add("@LockoutEnd", identityUser.LockoutEnd);
            dynamicParameters.Add("@LockoutEnabled", identityUser.LockoutEnabled);
            dynamicParameters.Add("@AccessFailedCount", identityUser.AccessFailedCount);
            return dynamicParameters;
        }
internal static DynamicParameters ToDynamicParameters ( this User identityUser ) { if ( identityUser == null ) { return null ; } DynamicParameters dynamicParameters = new DynamicParameters ( ) ; dynamicParameters . Add ( " " , identityUser . UserName ) ; dynamicParameters . Add ( " " , identityUser . NormalizedUserName ) ; dynamicParameters . Add ( " " , identityUser . Email ) ; dynamicParameters . Add ( " " , identityUser . NormalizedEmail ) ; dynamicParameters . Add ( " " , identityUser . EmailConfirmed ) ; dynamicParameters . Add ( " " , identityUser . PasswordHash ) ; dynamicParameters . Add ( " " , identityUser . SecurityStamp ) ; dynamicParameters . Add ( " " , identityUser . ConcurrencyStamp ) ; dynamicParameters . Add ( " " , identityUser . PhoneNumber ) ; dynamicParameters . Add ( " " , identityUser . PhoneNumberConfirmed ) ; dynamicParameters . Add ( " " , identityUser . TwoFactorEnabled ) ; dynamicParameters . Add ( " " , identityUser . LockoutEnd ) ; dynamicParameters . Add ( " " , identityUser . LockoutEnabled ) ; dynamicParameters . Add ( " " , identityUser . AccessFailedCount ) ; return dynamicParameters ; }
assemble from identity user to dynamic parameters
assemble from identity user to dynamic parameters
None
User
this
identityUser
identity user object
identity user object