public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,RefNumber,SSN,RefType,RefCategory,RefCategoryType,RefDistrict,RefClub,StreetAddress,ZipCode,City,PhoneNumber1,PhoneNumber2,Email,SeasonRegistred,Status")] SIFRef sIFRef) { if (id != sIFRef.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sIFRef); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SIFRefExists(sIFRef.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sIFRef)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,RefNumber,SSN,RefType,RefCategory,RefCategoryType,RefDistrict,RefClub,StreetAddress,ZipCode,City,PhoneNumber1,PhoneNumber2,Email,SeasonRegistred,Status")] SIFRef sIFRef) { if (ModelState.IsValid) { _context.Add(sIFRef); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sIFRef)); }