public ActionResult Endpoints(EndpointConfigurationModel endpoints)
        {
            if (ModelState.IsValid)
            {
                if (ConfigurationRepository.SupportsWriteAccess)
                {
                    ConfigurationRepository.UpdateEndpoints(endpoints.ToDomainModel());
                }
                
                return RedirectToAction("Index");
            }

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