public void EditCaritasMember(CaritasMember member) { var item = Database.CaritasMembers.SingleOrDefault(x => x.Id == member.Id); if (item == null) { return; } item.Assign(member); Database.SaveChanges(); }
public CaritasMember ShowDialog(CaritasMember member = null) { if (member != null) { (DataContext as AddCaritasMemberDialogViewModel)?.Edit(member); } var result = base.ShowDialog(); return(result == true ? (DataContext as AddCaritasMemberDialogViewModel)?.GetEntity() : null); }
public void AddCaritasMember(CaritasMember member) { Database.CaritasMembers.Add(member); Database.SaveChanges(); }