diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs index 5bc8e6a..bb41693 100644 --- a/Controllers/DisableController.cs +++ b/Controllers/DisableController.cs @@ -469,7 +469,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers if (req == null) return Error(GlobalMessages.InvalidRequestParam, (int)HttpStatusCode.BadRequest); - await _context.PeriodExams.AddAsync(new PeriodExam + var periodExam = new PeriodExam { Year = req.Year, Name = req.Name, @@ -492,11 +492,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers LastUpdatedAt = DateTime.Now, LastUpdateUserId = UserId ?? "", LastUpdateFullName = FullName ?? "System Administrator", - }); - + }; + await _context.PeriodExams.AddAsync(periodExam); await _context.SaveChangesAsync(); - return Success(); + return Success(periodExam); } catch (Exception ex) {