public void Test_RemovePicture()
        {
            //setup
            using (var context = _objectContextFactory.CreateObjectContext())
            {
                var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 1);
                provider.ImageUrl = "test";
                provider.PictureId = 999;
                context.SaveChanges();
            }

            var request = new UpdateProviderPictureRequest();
            request.ProviderId = 1;
            request.ImageUrl = null;
            request.PictureId = null;
            var handler = CreateHandler();

            //act
            var response = HandleRequest<UpdateProviderPictureResponse>(handler, request);

            //assert
            using (var context = _objectContextFactory.CreateObjectContext())
            {
                context.ContextOptions.LazyLoadingEnabled = true;
                context.ContextOptions.ProxyCreationEnabled = true;
                var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 1);
                Assert.IsNull(provider.PictureId);
                Assert.IsNull(provider.ImageUrl);
            }
        }
        public void Test()
        {
            //setup
            string imageUrl;
            int? pictureId;
            using (var context = _objectContextFactory.CreateObjectContext())
            {
                var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 1);
                imageUrl = provider.ImageUrl;
                pictureId = provider.PictureId;
            }
            var request = new UpdateProviderPictureRequest();
            request.ProviderId = 1;
            request.ImageUrl = Guid.NewGuid().ToString();
            request.PictureId = 123;
            var handler = CreateHandler();

            //act
            var response = HandleRequest<UpdateProviderPictureResponse>(handler, request);

            //assert
            using (var context = _objectContextFactory.CreateObjectContext())
            {
                context.ContextOptions.LazyLoadingEnabled = true;
                context.ContextOptions.ProxyCreationEnabled = true;
                var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 1);
                Assert.IsNotNull(provider.PictureId);
                Assert.AreEqual(request.PictureId, provider.PictureId);
                Assert.AreEqual(request.ImageUrl, provider.ImageUrl);
            }
        }