public async Task <IActionResult> Create([Bind("Id,Title")] SsmsInstances ssmsInstances) { if (ModelState.IsValid) { ssmsInstances.Id = Guid.NewGuid(); _context.Add(ssmsInstances); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ssmsInstances)); }
public async Task <IActionResult> Create([Bind("Id,Title,TableName,IdTab")] SsmsColumn ssmsColumn) { if (ModelState.IsValid) { ssmsColumn.Id = Guid.NewGuid(); _context.Add(ssmsColumn); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdTab"] = new SelectList(_context.SsmsTable, "Id", "Id", ssmsColumn.IdTab); return(View(ssmsColumn)); }
public async Task <IActionResult> Create([Bind("Id,Title,IdBds")] SsmsTable ssmsTable) { if (ModelState.IsValid) { ssmsTable.Id = Guid.NewGuid(); _context.Add(ssmsTable); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdBds"] = new SelectList(_context.SsmsDatabases, "Id", "Title", ssmsTable.IdBds); return(View(ssmsTable)); }