public Proposition Approve(Proposition proposition) { Proposition CurrentProposition = _propositionService.GetById(proposition.Id); CurrentProposition.Approval.Add(proposition.Approval.Last()); _approvalService.Save(proposition.Approval.Last()); return(CurrentProposition); }
public Proposition Approve(Proposition proposition) { Proposition CurrentProposition = _propositionService.GetById(proposition.Id); CurrentProposition.Approval.Add(proposition.Approval.Last()); if (CurrentProposition.Approval.Count() >= 2) { CurrentProposition.State = "Approved"; _propositionService.Update(CurrentProposition); } _approvalService.Save(proposition.Approval.Last()); return(CurrentProposition); }
public PropositionDTO GetById(long id) => _propositionConverter.ConvertEntityToDTO(_service.GetById(id));
public Proposition Approve(Proposition proposition) { Proposition CurrentProposition = _propositionService.GetById(proposition.Id); return(CurrentProposition); }