public bool AddNewBundle(AddBundleDTO bundleToAdd) { using (var db = new SqlConnection(_connectionString)) { var sql = @"INSERT INTO[dbo].[Bundle] ([FlowerId] ,[PuppyId] ,[OccasionId] ,[Description] ,[ProductImageUrl]) VALUES (@FlowerId , @PuppyId , @OccasionId , @Description , @ProductImageUrl)"; return(db.Execute(sql, bundleToAdd) == 1); } }
public IEnumerable <Bundle> AddBundle(AddBundleDTO bundleToAdd) { _repo.AddNewBundle(bundleToAdd); return(_repo.GetAllBundles()); }