// GET: RestServices/Details/5
        public ActionResult Details(string id)
        {
            RestServiceIdDto dto         = new RestServiceIdDto(id);
            RestServiceDto   restService = _restServicesManager.GetById(dto);

            return(View(restService));
        }
Exemplo n.º 2
0
        public static RestServiceDto ToDto(this RestService entity)
        {
            if (entity == null)
            {
                return(null);
            }

            RestServiceDto dto = new RestServiceDto();

            dto.RequestUrl = entity.RequestUrl;
            dto.HttpMethod = entity.HttpMethod;
            dto.BodyFormat = entity.BodyFormat;

            return(dto);
        }
        public ActionResult Edit(string id, IFormCollection collection)
        {
            try
            {
                RestServiceDto dto = new RestServiceDto();

                dto.Id         = id;
                dto.RequestUrl = collection["RequestUrl"];
                dto.HttpMethod = collection["HttpMethod"];
                dto.BodyFormat = collection["BodyFormat"];

                _restServicesManager.Update(dto);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 4
0
 public void Update(RestServiceDto dto)
 {
     throw new System.NotImplementedException();
 }