public Task<StatusData<ThumbsForSkillResponse>> UpsertThumbsForSkill(ThumbsForSkillRequest request, SystemSession session) { return _jUnitOfWork.ProfilePersonal.UpsertThumbsForSkill(request, session); }
public async Task<StatusData<ThumbsForSkillResponse>> UpsertThumbsForSkill(ThumbsForSkillRequest request, SystemSession session) { var serviceRequest = new Kauwa.Skill { UserId = session.UserId, Username = session.UserName, SkillTypeId = request.SkillTypeId, ThumbsUpOrDown = request.ThumbsUporDown, ProfileUser = request.ProfileUser, UserIdOrName = session.UserName }; var response = await Task.Factory.StartNew(() => Client.UserService.upsertThumbsForSkill(serviceRequest, session.GetSession())).ConfigureAwait(false); var result = new StatusData<ThumbsForSkillResponse> { Status = (SystemDbStatus)response.DbStatus.DbStatusCode, Message = response.DbStatus.DbStatusMsg, SubStatus = response.DbStatus.DbSubStatusCode }; if (result.Status.IsOperationSuccessful()) { result.Data = new ThumbsForSkillResponse { ThumbsUp = response.ThumbsUp, ThumbsDown = response.ThumbsDown, YourThumb = response.YourThumb }; } return result; }