public FeedEvent(Speech speech, int? commentcount) { this.date = speech.Deliberation.Date.Value; this.BodyText = speech.SpeechParas.OrderBy(_ => _.Number).Take(3). Select(_ => _.ParText).Aggregate((a, b) => a + " " + b).PresentText(200); this.ActionText = "Debaterede ved " + speech.Deliberation.Number.UrlValue() + ". behandling"; this.ActionUrl = speech.LinkTo(); this.SubjectText = speech.Deliberation.Law.ShortName.PresentText(35); this.SubjectUrl = speech.Deliberation.Law.DetailsLink(); this.Comments = commentcount; this.Binder = "af"; //this.Comments = speech.SpeechParas.Sum(_ => _.SpeechParaComments.Count); }
partial void InsertSpeech(Speech instance);
private void detach_Speeches(Speech entity) { this.SendPropertyChanging(); entity.Politician = null; }
private void attach_Speeches(Speech entity) { this.SendPropertyChanging(); entity.Speech1 = this; }
private void detach_Speeches(Speech entity) { this.SendPropertyChanging(); entity.Deliberation = null; }
partial void DeleteSpeech(Speech instance);
partial void UpdateSpeech(Speech instance);