Beispiel #1
0
 public ObservableCollection<RaffleModel> GetRaffleModelFrom(
     ICollection<Raffle> entities)
 {
     ObservableCollection<RaffleModel> collection =
         new ObservableCollection<RaffleModel>();
     foreach (Raffle entity in entities) {
         RaffleModel model = new RaffleModel(entity);
         collection.Add(model);
     }
     return collection;
 }
 private void AddRaffle()
 {
     var raffle = new Raffle {
         Name = "<Enter Name, and Select Items and Participants>",
         Location = new ContactDetails() { Address1 = "<Enter Location and Contact Details>" },
         RaffleParticipants = new ObservableCollection<RaffleParticipant>(),
         RaffleItems = new ObservableCollection<RaffleItem>()
     };
     uow.Raffles.Add(raffle);
     SelectedRaffle = new RaffleModel(raffle);
     Raffles.Add(SelectedRaffle);
     ClearSelectedItems();
     ClearSelectedParticipants();
 }