public async Task <MessageModel <string> > Post([FromBody] ExamDetailScore ExamDetailScore) { var data = new MessageModel <string>(); var id = await _iExamDetailScoreRepository.Add(ExamDetailScore); data.success = id > 0; if (data.success) { data.response = id.ObjToString(); data.msg = "添加成功"; } return(data); }
public async Task <MessageModel <string> > Put([FromBody] ExamDetailScore ExamDetailScore) { var data = new MessageModel <string>(); if (ExamDetailScore != null && ExamDetailScore.Id > 0) { data.success = await _iExamDetailScoreRepository.Update(ExamDetailScore); if (data.success) { data.msg = "更新成功"; data.response = ExamDetailScore?.Id.ObjToString(); } } return(data); }