Esempio n. 1
0
 public void SaveItemAsync(Answer answer)
 {
     if (answer.AnswerID != 0)
     {
         WriteOperations.UpdateWithChildren(db, answer); //return db.UpdateAsync(answer);
     }
     else
     {
         WriteOperations.InsertWithChildren(db, answer);  //return db.InsertAsync(answer);
     }
 }
Esempio n. 2
0
 public void SaveItemAsync(Question question)
 {
     if (question.QuestionID != 0)
     {
         WriteOperations.UpdateWithChildren(db, question); //return db.UpdateAsync(question);
     }
     else
     {
         WriteOperations.InsertWithChildren(db, question);//return db.InsertAsync(question);
     }
 }
Esempio n. 3
0
 //user
 public void SaveItemAsync(User user, bool isNewUser = false)
 {
     if (user != null)
     {
         if (isNewUser)
         {
             WriteOperations.InsertWithChildren(db, user);
         }
         else
         {
             WriteOperations.UpdateWithChildren(db, user);
         }
     }
 }
Esempio n. 4
0
 // Adicionar categoria
 public void InsertCategory(Category category)
 {
     WriteOperations.InsertWithChildren(sqliteconnection, category);
 }
Esempio n. 5
0
 // Adicionar Produto
 public void InsertProduct(Product product)
 {
     WriteOperations.InsertWithChildren(sqliteconnection, product);
 }