Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
         }
     }
 }
Beispiel #4
0
 // Adicionar categoria
 public void InsertCategory(Category category)
 {
     WriteOperations.InsertWithChildren(sqliteconnection, category);
 }
Beispiel #5
0
 // Adicionar Produto
 public void InsertProduct(Product product)
 {
     WriteOperations.InsertWithChildren(sqliteconnection, product);
 }