public async Task <object> Put(UpdateScore request) { var response = new BaseResponse(); Expression <Func <Score, bool> > keySelector = x => x.StudentId == request.StudentId && x.SubjectId == request.SubjectId; var entity = await _scoreService.GetById(keySelector : keySelector); request.ToEntity(entity); var result = await _scoreService.Update(entity); response.Success = true; response.Message = "Update score success"; response.StatusCode = (int)HttpStatusCode.OK; response.Results = result.ConvertTo <ScoreDto>(); return(response); }