public async Task <IActionResult> Edit(string id, [Bind("province_code,country_code,district_code,subdistrict_code,zip_code,id,rowversion,x_log,x_note,x_status")] ini_list_zip ini_list_zip) { if (id != ini_list_zip.province_code) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ini_list_zip); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ini_list_zipExists(ini_list_zip.province_code)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(ini_list_zip)); }
public async Task <IActionResult> Create([Bind("province_code,country_code,district_code,subdistrict_code,zip_code,id,rowversion,x_log,x_note,x_status")] ini_list_zip ini_list_zip) { if (ModelState.IsValid) { _context.Add(ini_list_zip); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(ini_list_zip)); }