public IndexViewModel(User user, DateTime startDate, IEnumerable<User> users) { StartDate = startDate; Users = users; User = user; var days = new List<DayViewModel>(); var nextMonth = startDate.AddMonths(1); var tmp = startDate; while (nextMonth > tmp) { days.Add(new DayViewModel{ Date = tmp, Abscent = user.AbsentDays != null && user.AbsentDays.Any(d => d.Date == tmp.Date) }); tmp = tmp.AddDays(1); } Days = days; }
public void Save(User entity) { this.session.Store(entity); }
public void Remove(User entity) { throw new NotImplementedException(); }