public ActionResult Configuration(GlobalConfigurationModel configuration)
        {
            if (ModelState.IsValid)
            {
                if (ConfigurationRepository.SupportsWriteAccess)
                {
                    ConfigurationRepository.UpdateConfiguration(configuration.ToDomainModel());
                }
                
                return RedirectToAction("Index");
            }

            return View();
        }
 public static GlobalConfiguration ToDomainModel(this GlobalConfigurationModel model)
 {
     return(Mapper.Map <GlobalConfigurationModel, GlobalConfiguration>(model));
 }