Ejemplo n.º 1
0
        [HttpPost] // patch for shared server compatibility, usually would use [HttpPut]
        public JsonNetResult UpdatePageWidget(PageWidgetModel model)
        {
            PageWidget widget = Mapper.Map <PageWidget>(model);

            _pageWidgetRepository.Update(widget);
            Mapper.Map(widget, model);

            return(new JsonNetResult(model));
        }
Ejemplo n.º 2
0
 [HttpPost] // patch for shared server compatibility, usually would use [HttpDelete]
 public JsonNetResult DeletePageWidget(PageWidgetModel model)
 {
     _pageWidgetRepository.Delete(
         _pageWidgetRepository.FindById(model.Id));
     return(new JsonNetResult(model));
 }