public async Task <IActionResult> Edit(string id, [Bind("SystemType,JsonSchema")] SourceAndTargetSystemsJsonSchema sourceAndTargetSystemsJsonSchema) { if (id != sourceAndTargetSystemsJsonSchema.SystemType) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sourceAndTargetSystemsJsonSchema); if (!await CanPerformCurrentActionOnRecord(sourceAndTargetSystemsJsonSchema)) { return(new ForbidResult()); } await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SourceAndTargetSystemsJsonSchemaExists(sourceAndTargetSystemsJsonSchema.SystemType)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(IndexDataTable))); } return(View(sourceAndTargetSystemsJsonSchema)); }
public async Task <IActionResult> Create([Bind("SystemType,JsonSchema")] SourceAndTargetSystemsJsonSchema sourceAndTargetSystemsJsonSchema) { if (ModelState.IsValid) { _context.Add(sourceAndTargetSystemsJsonSchema); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(IndexDataTable))); } return(View(sourceAndTargetSystemsJsonSchema)); }
public async Task <IActionResult> Create([Bind("SystemType,JsonSchema")] SourceAndTargetSystemsJsonSchema sourceAndTargetSystemsJsonSchema) { if (ModelState.IsValid) { _context.Add(sourceAndTargetSystemsJsonSchema); if (!await CanPerformCurrentActionOnRecord(sourceAndTargetSystemsJsonSchema)) { return(new ForbidResult()); } await _context.SaveChangesAsync(); return(RedirectToAction(nameof(IndexDataTable))); } return(View(sourceAndTargetSystemsJsonSchema)); }
// GET: SourceAndTargetSystemsJsonSchema/Create public IActionResult Create() { SourceAndTargetSystemsJsonSchema sourceAndTargetSystemsJsonSchema = new SourceAndTargetSystemsJsonSchema(); return(View(sourceAndTargetSystemsJsonSchema)); }