public async Task <IActionResult> Post([FromBody] LearnerModel model) { try { var userId = User.Identity.Name; if (userId != null) { model.CreateUserId = Guid.Parse(userId); model.CreateDate = DateTime.Now; model.ModifyUserId = Guid.Parse(userId); model.ModifyDate = DateTime.Now; return(Ok(_learnerService.CreateLearner(model))); } return(BadRequest("An error has occurred, please contact system administrator!")); } catch (Exception e) { throw new Exception(e.Message); } }