public IActionResult Post([FromBody] Page page) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } pageManager.AddPage(page); return(CreatedAtAction(nameof(Get), new { id = page.Id }, page)); }
public void Edit(RootDisplayModel model) { RootEditorViewModel viewModel = new RootEditorViewModel(model); mPageManager.AddPage(viewModel); }