public Issue(IssueEstimation issueEstimation, Transportation.Repository.Interfaces.IIssueEstimationRepository issueEstimationRepository, IProjectFactory projectFactory) { _issueEstimation = issueEstimation; _issueEstimationRepository = issueEstimationRepository; _projectFactory = projectFactory; }
public void Estimate(string issue, int estimation) { IssueEstimation predecessor = _issueEstimationRepository.GetAll() .First(x => x.IsFinal && x.ProjectUser.Id == _projectUser.Id && x.Issue == issue); predecessor.IsFinal = false; _issueEstimationRepository.AddOrUpdate(predecessor); IssueEstimation issueEstimation = new IssueEstimation { CreatedAt = DateTime.Now, Estimation = estimation, IsFinal = true, Issue = issue, ProjectUser = _projectUser }; _issueEstimationRepository.AddOrUpdate(issueEstimation); }
public IIssue Get(IssueEstimation issueEstimation) { return(new Issue(issueEstimation, _issueEstimationRepository, _projectFactory)); }