public async Task <IActionResult> Edit(string id, mbc_db_viptype mbc_dv_movie) { if (id != mbc_dv_movie.ID) { return(NotFound()); } if (ModelState.IsValid) { try { await _respository.UpdateAsync(mbc_dv_movie); } catch (DbUpdateConcurrencyException) { if (_respository.GetByIDAsync(mbc_dv_movie.ID) == null) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(mbc_dv_movie)); }
public async Task <IActionResult> Create(mbc_db_viptype mbc_dv_movie) { if (ModelState.IsValid) { await _respository.InsertAsync(mbc_dv_movie); return(RedirectToAction(nameof(Index))); } return(View(mbc_dv_movie)); }