/// <summary> /// Deprecated Method for adding a new object to the PresentationSpeakers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPresentationSpeakers(PresentationSpeaker presentationSpeaker) { base.AddObject("PresentationSpeakers", presentationSpeaker); }
private void AddClosed(object sender, DeactivationEventArgs e) { if (vm.WasCancelled) return; if (!context.IsSubmitting) { var newPresentation = vm.Presentation; BusyMessage = "Adding New Presentation...Please wait."; IsBusy = true; // verify we are truly adding a new presentation if (newPresentation.Id == 0) { // Map Model.Presentation to new Presentation var entityPresentation = new Presentation { Name = newPresentation.Name, Description = newPresentation.Description, Level = newPresentation.Level }; // default EventPresentation status is Registered var eventPresentation = new EventPresentation { EventId = App.Event.Id, ApprovalStatus = "Registered", PresentationId = newPresentation.Id }; var presentationSpeaker = new PresentationSpeaker { PresentationsAsSpeaker_Id = newPresentation.Id, Speakers_Id = App.LoggedInPerson.Id }; entityPresentation.EventPresentations.Add(eventPresentation); entityPresentation.PresentationSpeakers.Add(presentationSpeaker); context.Presentations.Add(entityPresentation); } try { context.SubmitChanges(ChangesSubmitted, null); } catch (DomainOperationException dex) { EventAggregator.Publish(new ErrorWindowEvent {Exception = dex, ViewModelName = "SpeakerViewModel"}); _loggingService.LogException(dex); } } }
/// <summary> /// Create a new PresentationSpeaker object. /// </summary> /// <param name="presentationsAsSpeaker_Id">Initial value of the PresentationsAsSpeaker_Id property.</param> /// <param name="speakers_Id">Initial value of the Speakers_Id property.</param> public static PresentationSpeaker CreatePresentationSpeaker(global::System.Int32 presentationsAsSpeaker_Id, global::System.Int32 speakers_Id) { PresentationSpeaker presentationSpeaker = new PresentationSpeaker(); presentationSpeaker.PresentationsAsSpeaker_Id = presentationsAsSpeaker_Id; presentationSpeaker.Speakers_Id = speakers_Id; return presentationSpeaker; }