public static async Task<Organization> UpdateOrganizationContact(this Organization organization, IPrimaryContactViewModel contactModel, AllReadyContext _context)
        {
            if (organization.OrganizationContacts == null)
            {
                organization.OrganizationContacts = new List<OrganizationContact>();
            }

            var primaryCampaignContact = organization.OrganizationContacts.SingleOrDefault(tc => tc.ContactType == (int)ContactTypes.Primary);
            var contactId = primaryCampaignContact?.ContactId;
            Contact primaryContact;

            var contactInfo = string.Concat(contactModel.PrimaryContactEmail?.Trim() + contactModel.PrimaryContactFirstName?.Trim(), contactModel.PrimaryContactLastName?.Trim(), contactModel.PrimaryContactPhoneNumber?.Trim());
            if (contactId == null)
            {
                primaryContact = new Contact();
            }
            else
            {
                primaryContact = await _context.Contacts.SingleAsync(c => c.Id == contactId);
            }

            if (string.IsNullOrWhiteSpace(contactInfo) && primaryCampaignContact != null)
            {
                //Delete
                _context.OrganizationContacts.Remove(primaryCampaignContact);
                _context.Remove(primaryCampaignContact);//Not Needed?
                _context.Remove(primaryCampaignContact.Contact);
            }
            else
            {
                primaryContact.Email = contactModel.PrimaryContactEmail;
                primaryContact.FirstName = contactModel.PrimaryContactFirstName;
                primaryContact.LastName = contactModel.PrimaryContactLastName;
                primaryContact.PhoneNumber = contactModel.PrimaryContactPhoneNumber;
                _context.AddOrUpdate(primaryContact);

                if (primaryCampaignContact == null)
                {
                    primaryCampaignContact = new OrganizationContact
                    {
                        Contact = primaryContact,
                        Organization = organization,
                        ContactType = (int)ContactTypes.Primary
                    };
                    organization.OrganizationContacts.Add(primaryCampaignContact);
                    _context.AddOrUpdate(primaryCampaignContact);
                }
            }

            return organization;
        }
        protected override void LoadTestData()
        {
            var organization = new Organization
            {
                Id = 1,
                Name = "Org 1",
                WebUrl = "http://www.org1.org",
                LogoUrl = "http://www.org1Logo.org",
                Location = new Location { Id = 1, Country="USA" },
                Campaigns = new List<Campaign>(),
                Users = new List<ApplicationUser>(),
                OrganizationContacts = new List<OrganizationContact>()
            };
            var campaign = new Campaign
            {
                Id = 1,
                Name = "Campaign 1",
                ManagingOrganizationId = 1
            };
            var user = new ApplicationUser
            {
                Id = Guid.NewGuid().ToString(),
                Email = "*****@*****.**"

            };
            var organizationContact = new OrganizationContact
            {
                OrganizationId = 1,
                ContactType = (int)ContactTypes.Primary,
                Contact = new Contact
                {
                    Id = 1,
                    Email = "*****@*****.**",
                    FirstName = "firstName",
                    LastName = "lastName",
                    PhoneNumber = "123"
                }
            };

            Context.Organizations.Add(organization);
            Context.Campaigns.Add(campaign);
            Context.Users.Add(user);
            Context.OrganizationContacts.Add(organizationContact);
            Context.SaveChanges();
        }