public ExamModel InsertExam(ExamModel model) { //if (model.Shift != null && model.ShiftId == 0) //{ // model.Shift.CreatedById = model.CreatedById; // model.Shift.CreatedDate = model.CreatedDate; // model.Shift.LastModifiedById = model.LastModifiedById; // model.Shift.LastModifiedDate = model.LastModifiedDate; // var shift = _shifts.InsertShift(model.Shift); // model.ShiftId = shift.Id; //} var inserted = _repo.Insert(model); return(GetExam(inserted.Id)); }
public IActionResult Post([FromBody] ExamModel model) { return(Post(_service.InsertExam, AuditNew(model))); }
public IActionResult Put(int id, [FromBody] ExamModel model) { return(Put(_service.UpdateExam, AuditExisting(model))); }
public ExamModel UpdateExam(ExamModel model) { var updated = _repo.Update(model); return(GetExam(updated.Id)); }