public async Task <IActionResult> Create([Bind("ClientId,ClientName")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); } return(RedirectToAction("Manage", "Repo")); }
public async Task <IActionResult> Create([Bind("UserId,UserName")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("ClientId,ClientName")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("ProjectId,ProjectName,ClientId")] Project project) { if (ModelState.IsValid) { _context.Add(project); await _context.SaveChangesAsync(); return(RedirectToAction("Manage", "Repo")); } ViewData["ClientId"] = new SelectList(_context.Clients, "ClientId", "ClientName", project.ClientId); return(View(project)); }
public async Task <IActionResult> Create([Bind("DacpacId,DacpacName,DatabaseId")] Dacpac dacpac) { if (ModelState.IsValid) { _context.Add(dacpac); await _context.SaveChangesAsync(); return(RedirectToAction("Manage", "Repo")); } ViewData["DatabaseId"] = new SelectList(_context.Databases, "DatabaseId", "DatabaseName", dacpac.DatabaseId); return(RedirectToAction("Manage", "Repo")); }
public async Task <IActionResult> Create([Bind("InstanceId,InstanceName,ProjectId")] Instance instance) { if (ModelState.IsValid) { _context.Add(instance); await _context.SaveChangesAsync(); return(RedirectToAction("Manage", "Repo")); } ViewData["ProjectId"] = new SelectList(_context.Projects, "ProjectId", "ProjectName", instance.ProjectId); return(View(instance)); }
public async Task <IActionResult> Create([Bind("DatabaseId,DatabaseName,InstanceId")] Database database) { if (ModelState.IsValid) { _context.Add(database); await _context.SaveChangesAsync(); return(RedirectToAction("Manage", "Repo")); } ViewData["InstanceId"] = new SelectList(_context.Instances, "InstanceId", "InstanceName", database.InstanceId); return(View(database)); }