//C create public async Task <ProjectParticipationHistory> CreateAsync(ProjectParticipationHistory projectParticipationHistory) { // projectParticipationHistory.User = await _unitOfWork.UserRepository. await _unitOfWork.ProjectParticipationHistory.AddAsync(projectParticipationHistory); await _unitOfWork.CommitAsync(); return(projectParticipationHistory); }
// U public async Task <ProjectParticipationHistory> UpdateAsync(ProjectParticipationHistory projectParticipationHistory) { var result = await _unitOfWork.ProjectParticipationHistory.UpdateAsync(projectParticipationHistory, projectParticipationHistory.ProjectId); if (result == null) { throw new UserFriendlyException(500, "Internal server Error"); } await _unitOfWork.CommitAsync(); return(result); }
public async Task <IHttpActionResult> Create(ProjectParticipationHistoryBindingModel projectModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } ProjectParticipationHistory projectHistory = new ProjectParticipationHistory(); Mapper.Map(projectModel, projectHistory); var result = await _projectParticipationHistoryService.CreateAsync(projectHistory); return(Ok(result)); }
public void RemoveFromProject(ProjectParticipationHistory participationHistory) { throw new NotImplementedException(); }
public void AddToProject(ProjectParticipationHistory participationHistory) { throw new NotImplementedException(); }
public void RemoveFromProject(ProjectParticipationHistory participationHistory) { _dbSetParticipationHistories.Remove(participationHistory); }
public void AddToProject(ProjectParticipationHistory participationHistory) { _dbSetParticipationHistories.Add(participationHistory); }
public virtual void Delete(ProjectParticipationHistory projectRole) { unitOfWork.ProjectParticipationHistories.Remove(projectRole); unitOfWork.Save(); }
public virtual void Insert(ProjectParticipationHistory projectRole) { unitOfWork.ProjectParticipationHistories.Insert(projectRole); unitOfWork.Save(); }