Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        public void Create(AddClubProductCommand newClubProduct)
        {
            var repo = new ClubProductRepository();

            repo.AddClubProduct(newClubProduct);
        }