public virtual void Update(KpiRev newRevision) { var currentRevision = ActiveRevision; currentRevision?.Deactivate(); KpiRevs.Add(newRevision); }
public static KpiRev Create(Kpi kpi, string kpiName, string kpiDesc, string calculationFormula, UnitOfMeasure unitOfMeasure, MonthlyValuesValueObject targets, User userCreator) { var entity = new KpiRev(userCreator) { Kpi = kpi, KpiName = kpiName, KpiDesc = kpiDesc, CalculationFormula = calculationFormula, UnitOfMeasure = unitOfMeasure, Targets = targets }; return(entity); }