Esempio n. 1
0
 public bool CheckIdentity(Identity identity)
 {
     var result = QueryStoreProcedure("GetIdentity", new Dictionary<string, object>
                                                   {
                                                       {"param_memberName", identity.MemberName.ToLower()}
                                                   });
     if (result.Tables[0].Rows.Count > 0)
     {
         var idInDb = new Identity().FromRow(result.Tables[0].Rows[0]);
         return idInDb.MemberName == identity.MemberName && idInDb.PasswordHash == identity.PasswordHash;
     }
     return false;
 }
Esempio n. 2
0
 public Identity AddIdentity(Identity newIdentity)
 {
     var result = QueryStoreProcedure("AddIdentity", new Dictionary<string, object>
                                                   {
                                                       {"param_memberName", newIdentity.MemberName.ToLower()},
                                                       {"param_passwordHash", newIdentity.PasswordHash}
                                                   });
     if (result.Tables[0].Rows.Count > 0)
     {
         return new Identity().FromRow(result.Tables[0].Rows[0]);
     }
     return null;
 }