コード例 #1
0
        private static void HardCodeUpdate()
        {
            AerospikeWriteClient w = new AerospikeWriteClient();
            Card r = new Card()
            {
                BackSide = "Американский полицейский"
            };

            w.Update(r, 4);
            User u = new User()
            {
                Email = "[email protected]"
            };

            w.Update(u, 1);
        }
コード例 #2
0
 public CollectionInfo UpdateCollection(CollectionInfo collection, int id)
 {
     try
     {
         using var writeClient = new AerospikeWriteClient();
         Collection u = new Collection()
         {
             Name        = collection.Name,
             Description = collection.Description
         };
         writeClient.Update(u, id);
         return(collection);
     }
     catch (DatabaseException e)
     {
         throw new GraphQlException(e.Message);
     }
 }
コード例 #3
0
 public CardInfo UpdateCard(CardInfo card, int id)
 {
     try
     {
         using var writeClient = new AerospikeWriteClient();
         Card u = new Card()
         {
             FrontSide = card.FrontSide,
             BackSide  = card.BackSide
         };
         writeClient.Update(u, id);
         return(card);
     }
     catch (DatabaseException e)
     {
         throw new GraphQlException(e.Message);
     }
 }
コード例 #4
0
 public UserInfo UpdateUser(UserInfo user, int id)
 {
     try
     {
         using var writeClient = new AerospikeWriteClient();
         User u = new User()
         {
             Login = user.Login,
             Email = user.Email
         };
         writeClient.Update(u, id);
         return(user);
     }
     catch (DatabaseException e)
     {
         throw new GraphQlException(e.Message);
     }
 }