public async Task <ActionResult> Create(ModuleVM vm) { if (ModelState.IsValid) { vm.ModuleLib = vm.ModuleLib; await modulesService.Create(vm); return(RedirectToAction("Index")); } return(View(vm)); }
public ActionResult Create(Module module) { return(new JsonResult(modulesService.Create(module))); }