Beispiel #1
0
 public Category AddCategory(Category category)
 {
     var categoryId = this._db.Query<Guid>(INSERT_CATEGORY_QUERY, category).FirstOrDefault();
     category.Id = categoryId;
     return category;
 }
Beispiel #2
0
 public Category UpdateCategory(Category category)
 {
     var sqlQuery =
     "UPDATE Category " +
     "SET Name = @Name " +
     "WHERE Id = @Id";
     this._db.Execute(sqlQuery, category);
     return category;
 }