private void Load() { Appointments.Clear(); _myAvailabilities.Clear(); _availabilityRepository.All().ForEach(x => { if (x.EndDateTime == null) { return; } var appointment = new Appointment { Subject = x.Remark, StartTime = x.StartDateTime, EndTime = x.EndDateTime.Value, DescriptionText = $"{x.Employee.FirstName} {x.Employee.LastNamePrefix} {x.Employee.LastName}", Locked = x.EmployeeID != Settings.CurrentUser.ID, AllowMove = x.EmployeeID == Settings.CurrentUser.ID, AllowChangeStart = x.EmployeeID == Settings.CurrentUser.ID, AllowChangeEnd = x.EmployeeID == Settings.CurrentUser.ID }; Appointments.Add(appointment); }); RaisePropertyChanged(nameof(Appointments)); }