public async Task Edit(int id, InterviewerTestEditBindingModel model)
        {
            var test = await this.DbContext.Tests.FindAsync(id);

            test.Description = model.Description;

            await this.DbContext.SaveChangesAsync();
        }
Example #2
0
        public async Task <IActionResult> Edit(int id, InterviewerTestEditBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            await this.tests.Edit(id, model);

            TempData.AddSuccessMessage(EditTestDescriptionMessage);

            return(RedirectToAction(nameof(All)));
        }