private async void RemoveObject()
        {
            if (!await _dialogsHelper.ShowRequest("Удалить объект?", WindowType.ObjectBrowser))
            {
                return;
            }

            _objectsRepository.Remove(_selected.Properties.Id);
            SetSelected(null);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <Object> > mockSetObjects;
            var mockContext = ObjectsMockingSetup.DoMockingSetupForContext(true, out mockSetObjects);
            var repository  = new ObjectsRepository(mockContext.Object);
            var objects     = repository.Get(1);

            // Act
            repository.Remove(objects);
            // Assert
            mockSetObjects.Verify(x => x.Remove((Object)objects), Times.Once);
        }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<Object>> mockSetObjects;
     var mockContext = ObjectsMockingSetup.DoMockingSetupForContext(true, out mockSetObjects);
     var repository = new ObjectsRepository(mockContext.Object);
     var objects = repository.Get(1);
     // Act
     repository.Remove(objects);
     // Assert
     mockSetObjects.Verify(x => x.Remove((Object)objects), Times.Once);
 }