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