public static MboKpi Create(MboRev mboRev, Kpi kpi) { var entity = new MboKpi() { Revision = mboRev, Kpi = kpi }; return(entity); }
public static MboRev Create(Mbo mbo, IList <Kpi> kpis, IDictionary <Kpi, MonthlyValuesValueObject> actuals, User userCreator) { var entity = new MboRev(userCreator) { Mbo = mbo }; entity.Kpis = kpis.Select(kpi => MboKpi.Create(entity, kpi)).ToList(); entity.Actuals = actuals.Select(actuals => MboActuals.Create(entity, actuals.Key, actuals.Value)).ToList(); return(entity); }