public async Task<ActionResult> ResolveDiscrepancy(SeedDiscrepancyViewModel vm)
 {
     var seed = SeedDiscrepancyViewModel.ToEngagerDiscrepancy(vm);
     var result = await _service.Resolve(seed);
     var reply = SeedDiscrepancyResolutionViewModel.FromResolution(result);
     return new JsonNetResult(reply);
 }
 private static Account createAccount(SeedDiscrepancyViewModel vm)
 {
     return !vm.AccountId.HasValue ? null : new Account()
     {
         EmailAddress = vm.EmailAddress,
         FirstName = vm.FirstName,
         LastName = vm.LastName,
         DateOfBirth = vm.DOB,
         Gender = vm.Gender,
         Country = vm.Country,
         State = vm.State,
         City = vm.City,
         Zip = vm.ZipCode,
         AccountId = vm.AccountId.Value,
         ProviderId = vm.ProviderId.GetValueOrDefault(),
         ServerId = vm.ServerId.GetValueOrDefault(),
         IsActive = vm.IsActive.GetValueOrDefault(),
         DateAccountCreated = vm.AccountDateCreated.GetValueOrDefault(),
         LastEngagedDate = vm.LastEngagedDate.GetValueOrDefault()
     };
 }
 private static Subscriber createSubscriber(SeedDiscrepancyViewModel vm)
 {
     return !vm.SubscriberId.HasValue ? null : new Subscriber()
     {
         email = vm.EmailAddress,
         firstName = vm.FirstName,
         lastName = vm.LastName,
         dob = vm.DOB,
         gender = vm.Gender,
         country = vm.Country,
         state = vm.State,
         city = vm.City,
         zip = vm.ZipCode,
         subscriber_id = vm.SubscriberId.Value,
         send = (byte) (vm.IsMailable.GetValueOrDefault() ? 1 : 0),
         insertionDate = vm.SubscriberDateCreated.GetValueOrDefault()
     };
 }
 public static SeedDiscrepancy ToEngagerDiscrepancy(SeedDiscrepancyViewModel vm)
 {
     var account = createAccount(vm);
     var subscriber = createSubscriber(vm);
     return SeedDiscrepancy.FromEngager(account, subscriber);
 }