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