internal long GetIdentity() { var query = GetIncrementIdentity.Create(this); var sql = query.Build(null); return(SqlHelper.ExecuteScalar <long>(this.ConnectionName, sql)); }
internal long GetIdentity() { var query = GetIncrementIdentity.Create(this); var sql = query.Build(null, this); if (this.IsEnabledMultiTenancy) { var param = new DynamicData(); param.Add(GeneratedField.TenantIdName, AppSession.TenantId); return(SqlHelper.ExecuteScalar <long>(this.ConnectionName, sql, param)); } else { return(SqlHelper.ExecuteScalar <long>(this.ConnectionName, sql)); } }