public async Task <IActionResult> Create([Bind("Id,EmployeeNumber,FirstName,MiddleName,LastName,Alias,Position,Age,Weight,Height,Nationality,Region,CivilStatus,Birthday,IsDomainUser")] Employee employee) { if (ModelState.IsValid) { _context.Add(employee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employee)); }
public async Task <IActionResult> Create([Bind("Id,Title,IRNumber,IncidentDate,ReportedDate,Details,IncidentLocation,Status")] InitialReport initialReport) { if (ModelState.IsValid) { _context.Add(initialReport); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(initialReport)); }
public async Task <IActionResult> Create([Bind("Id,Name,Address")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }