public void createComponentBySection(CodeEnum code, string text, bool allowText, int subSectionLevel) { var section = createSection(code, text, allowText, subSectionLevel); if (section == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } else { comPlaceholder.CreateComponent(section); } }
public IActionResult CreateComponent(string buttonValue, Component input) { if (buttonValue == "Cancel") { return(RedirectToAction("Index")); } _componentRepository.CreateComponent(input); return(RedirectToAction("Index")); }
public Component CreatComponent([FromBody] Component component) { return(componentRepository.CreateComponent(component)); }