public bool AddClubProduct(AddClubProductCommand newClubProduct) { using (var db = new SqlConnection(_connectionString)) { var sql = @"INSERT INTO [dbo].[ClubProduct] ([ClubId] ,[ProductId]) VALUES (@clubId ,@productId)"; return(db.Execute(sql, newClubProduct) == 1); } }
public void Create(AddClubProductCommand newClubProduct) { var repo = new ClubProductRepository(); repo.AddClubProduct(newClubProduct); }