public Gig(string artistId, GigFormViewModel viewModel) { ArtistId = artistId; DateTime = viewModel.DateTime(); GenreId = viewModel.Genre; Venue = viewModel.Venue; }
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); } }