public PeriodModel MapData(Period p) { PeriodModel pm = new PeriodModel(); pm.Id = p.Id; pm.PeriodNr = p.PeriodNr; pm.DateStart = p.DateStart; pm.DateEnd = p.DateEnd; pm.VacId = p.Vacation.Id; return pm; }
public Period MapData(PeriodModel pm, int p) { Period period = new Period(); period.Id = pm.Id; period.PeriodNr = pm.PeriodNr; period.DateStart = pm.DateStart; period.DateEnd = pm.DateEnd; // period.Vacation.Id = p; return period; }