public Task<StatusData<long>> InsertEducationHistory(AddAcademicRequest request, SystemSession session) { return _jUnitOfWork.ProfilePersonal.InsertEducationHistory(request, session); }
public async Task<StatusData<long>> InsertEducationHistory(AddAcademicRequest request, SystemSession session) { var serviceRequest = new UserAcademics { UserId = session.UserId, Mode = (byte)SystemDbStatus.Inserted, DisplayOrderId = 0, AcademicInstitute = request.AcademicInstitute, City = new City { CityId = request.CityId > 0 ? request.CityId : 0 }, JoinedYear = request.JoinedYear.ToString(), GraduatedYear = request.GraduatedYear.ToString(), HasGraduated = request.HasGraduated, Degree = null, Concentration = new Concentration { ConcentrationName = request.Concentration }, AcademicId = 0, UserIdOrName = session.UserName }; var response = await Task.Factory.StartNew(() => Client.UserService.upsertAcademic(serviceRequest, session.GetSession())).ConfigureAwait(false); var result = new StatusData<long> { Status = (SystemDbStatus)response.DbStatus.DbStatusCode, Message = response.DbStatus.DbStatusMsg, SubStatus = response.DbStatus.DbSubStatusCode }; if (result.Status.IsOperationSuccessful()) result.Data = response.AcademicId; return result; }