public void InsertOneCoffee(CoffeeDBO model) { string sql = @"INSERT INTO Coffee (Name, Description, Price) VALUES (@Name , @Description, @Price);"; using (var connection = new SqlConnection(_connectionString)) { var coffees = connection.Execute(sql, model); } }
public void UpdateSelectedCoffee(CoffeeDBO model) { string sql = @"UPDATE Coffee SET Name = @Name, Description = @Description, Price = @Price WHERE ID = @ID; "; using (var connection = new SqlConnection(_connectionString)) { var coffees = connection.Execute(sql, model); } }