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); } }
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); } }
//user public void SaveItemAsync(User user, bool isNewUser = false) { if (user != null) { if (isNewUser) { WriteOperations.InsertWithChildren(db, user); } else { WriteOperations.UpdateWithChildren(db, user); } } }
// Adicionar categoria public void InsertCategory(Category category) { WriteOperations.InsertWithChildren(sqliteconnection, category); }
// Adicionar Produto public void InsertProduct(Product product) { WriteOperations.InsertWithChildren(sqliteconnection, product); }