public IActionResult DeleteConfirmed(int id)
        {
            CollectionItem serviceItem = _collectionItemService.GetById(id);

            _collectionItemService.Delete(serviceItem);
            _collectionItemService.Commit();
            return(RedirectToAction("Index"));
        }
        public void Remove_RemovingCollectionItem_ShouldRemoveCollectionItem()
        {
            // Arrange

            var entity = new CollectionItem
            {
                Name = "Test"
            };

            _db.CollectionItems.Add(entity);
            _db.SaveChanges();
            var before = _db.CollectionItems.Count();

            // Act
            _service.Delete(entity);
            _db.SaveChanges();

            // Assert
            Assert.Equal(1, before - _db.CollectionItems.Count());
        }