コード例 #1
0
        public async Task <ActionResult> AddCareerProfile(AppliedJobHistory careerProfile)
        {
            _unitOfWork.HistoryRepository.AddHistory(careerProfile);

            await _unitOfWork.Complete();

            return(Ok());
        }
コード例 #2
0
        public async Task <ActionResult> UpdateCareerProfile(AppliedJobHistory careerProfile)
        {
            _unitOfWork.HistoryRepository.UpdateHistory(careerProfile);

            if (await _unitOfWork.Complete())
            {
                return(NoContent());
            }

            return(BadRequest("Failed to Update Career Profile"));
        }
コード例 #3
0
 public void UpdateHistory(AppliedJobHistory history)
 {
     _context.Entry(history).State = EntityState.Modified;
 }
コード例 #4
0
 public void AddHistory(AppliedJobHistory history)
 {
     _context.AppliedJobHistories.Add(history);
 }