Esempio n. 1
0
 public Gig(string artistId, GigFormViewModel viewModel)
 {
     ArtistId = artistId;
     DateTime = viewModel.DateTime();
     GenreId  = viewModel.Genre;
     Venue    = viewModel.Venue;
 }
Esempio n. 2
0
        public void Update(GigFormViewModel viewModel)
        {
            var notification = Notification.CreateUpdateNotification(this);

            DateTime = viewModel.DateTime();
            GenreId  = viewModel.Genre;
            Venue    = viewModel.Venue;

            foreach (ApplicationUser attendee in Attendances.Select(a => a.Attendee))
            {
                attendee.Notify(notification);
            }
        }