示例#1
0
        public ActionResult EditQa(Qa qa)
        {
            Log.Debug($"Updating {qa.Question}");
            if (ModelState.IsValid)
            {
                try
                {
                    qaService.UpdateQa(qa);
                    Log.Info($"{qa.Question} was updated succesfully");
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }

            return(RedirectToAction("Qas"));
        }
示例#2
0
 public ActionResult EditQa(Qa qa)
 {
     qaService.UpdateQa(qa);
     return(RedirectToAction("GetAllQas"));
 }