public bool Delete()
        {
            int id;
            using (var customerDbContext = new CustomerDbContext(_connectionString))
            {
                var customer = customerDbContext.Customers.Add(new Customer
                {
                    Name = "",
                    Gender = "",
                    HouseNumber = 1,
                    AddressLine1 = "",
                    State = "",
                    Country = "",
                    Category = "",
                    DateOfBirth = new DateTime()
                });

                customerDbContext.SaveChanges();
                id = customer.Entity.Id;
            }

            var request = WebRequest.Create(_serviceURI + "customer/" + id);
            request.Method = "DELETE";

            request.GetResponse();

            using (var customerDbContext = new CustomerDbContext(_connectionString))
            {
                var customer = customerDbContext.Customers.Include(c => c.CustomerUpdates).FirstOrDefault(c => c.Id == id);

                var hasUpdate = customer.CustomerUpdates.Last().Type == UpdateType.Remove.ToString();

                customerDbContext.CustomerUpdates.RemoveRange(customer.CustomerUpdates);
                customerDbContext.Customers.Remove(customer);
                customerDbContext.SaveChanges();

                return hasUpdate;
            }
        }
        public bool Post()
        {
            int id;
            using (var customerDbContext = new CustomerDbContext(_connectionString))
            {
                id = customerDbContext.Customers.Max(c => c.Id);
            }

            var request = WebRequest.Create(_serviceURI + "customer/");
            request.Method = "POST";
            request.ContentType = "text/json";

            using (var streamWriter = new StreamWriter(request.GetRequestStream()))
            {
                streamWriter.Write(JsonConvert.SerializeObject(new Customer
                {
                    Id = 0,
                    Name = "",
                    Gender = "",
                    HouseNumber = 1,
                    AddressLine1 = "",
                    State = "",
                    Country = "",
                    Category = "",
                    DateOfBirth = new DateTime()
                }));
            }

            request.GetResponse();

            Thread.Sleep(200); // wait for async persist

            using (var customerDbContext = new CustomerDbContext(_connectionString))
            {
                var customer = customerDbContext.Customers.Include(c => c.CustomerUpdates).FirstOrDefault(c => c.Id > id);

                var hasUpdate = customer.CustomerUpdates.Last().Type == UpdateType.Add.ToString();

                customerDbContext.CustomerUpdates.RemoveRange(customer.CustomerUpdates);
                customerDbContext.Customers.Remove(customer);
                customerDbContext.SaveChanges();

                return hasUpdate;
            }
        }