Exemplo n.º 1
0
 public ActionResult Create(string id, string command, Endpoint model)
 {
     var service = reader.GetService(command);
     if (!service.UserHasAccessTo()) throw new UnauthorizedAccessException("Access denied to configset");
     ViewBag.Name = service.ConfigSet.Name;
     ViewBag.System = service.ConfigSet.System;
     ViewBag.ServiceId = service.Id; 
     var endpoint=reader.CreateEndpoint(service, model.Name);
     return RedirectToAction("Details", new {id = "edit", item = endpoint.Id});
 }
Exemplo n.º 2
0
 public ActionResult Delete(string id, Endpoint model)
 {
     var endpoint = reader.GetEndpoint(id);
     reader.DeleteEndpoint(endpoint);
     return RedirectToAction("Details", new { id = "edit", item = endpoint.ServiceNameId });
 }