public static ConfigurationEditModel FromDomain(ApplicationConfiguration c)
		{
		    return new ConfigurationEditModel
		               {
		                   ProgramName = c.ProgramName,
		                   DefaultTheme = c.DefaultTheme,
                           DefaultHomePage = c.DefaultHomePage,
                           DefaultTermsOfService = c.DefaultTermsOfService,

                           DefaultLoginMenu = c.DefaultLoginMenu,
                           DefaultHeaderMenu = c.DefaultHeaderMenu,
                           DefaultNavigationMenu = c.DefaultNavigationMenu,
                           DefaultFooterMenu = c.DefaultFooterMenu,

                           MaintenancePage = c.MaintenancePage,

                           PaymentType = c.PaymentType,
                           GeneralControlAccount = c.GeneralControlAccount,
                           GeneralExpenseAccount = c.GeneralExpenseAccount,

                           DefaultCatalog = c.DefaultCatalog,
                           PointsPerDollar = c.PointsPerDollar,

		                   EmailSenderAddress = c.EmailSender.Address,
		                   EmailSenderName = c.EmailSender.Name,

                           SupportEmailAddress = c.SupportEmailAddress,
                           SupportPhoneNumber = c.SupportPhoneNumber,

                           GoogleAnalyticsCode = c.GoogleAnalyticsCode,

                           TicketJonesKey = c.TicketJonesKey,
                           TicketJonesUrl = c.TicketJonesUrl,

                           ShowProfileOnActivate = c.ShowProfileOnActivate,
                           Profile = c.Profile ?? new ProfileElements(),
                           CustomFields = c.CustomFields,
		               };
		}
		public void Apply(ApplicationConfiguration c)
		{
		    c.ProgramName = ProgramName;
		    c.DefaultTheme = DefaultTheme;
		    c.DefaultHomePage = DefaultHomePage;
		    c.DefaultTermsOfService = DefaultTermsOfService;

            c.DefaultLoginMenu = DefaultLoginMenu;
            c.DefaultHeaderMenu = DefaultHeaderMenu;
            c.DefaultNavigationMenu = DefaultNavigationMenu;
            c.DefaultFooterMenu = DefaultFooterMenu;

		    c.MaintenancePage = MaintenancePage;

		    c.PaymentType = PaymentType;
		    c.GeneralControlAccount = GeneralControlAccount;
		    c.GeneralExpenseAccount = GeneralExpenseAccount;

		    c.DefaultCatalog = DefaultCatalog;
		    c.PointsPerDollar = PointsPerDollar;

		    c.EmailSender = new EmailAddress
		                        {
		                            Address = EmailSenderAddress,
		                            Name = EmailSenderName,
		                        };

            c.SupportEmailAddress = SupportEmailAddress;
            c.SupportPhoneNumber = SupportPhoneNumber;

            c.GoogleAnalyticsCode = GoogleAnalyticsCode;

            c.TicketJonesKey = TicketJonesKey;
            c.TicketJonesUrl = TicketJonesUrl;

            c.ShowProfileOnActivate = ShowProfileOnActivate;
            c.Profile = Profile;
            c.CustomFields = CustomFields.Where(x => !String.IsNullOrEmpty(x)).ToArray();
		}