void CurrentSession_PostSendGroupMessageTimelineStatus(object sender, TimelineStatusGroupEventArgs e) { lock (_dataContext) { using (var ctx = new TwitterIrcGatewayDataContext()) { try { Timeline timeline = new Timeline { GroupId = _cacheGroup[e.Group.Name].Id, StatusId = e.Status.Id, UserId = CurrentSession.TwitterUser.Id }; if (ctx.Timeline.Contains(timeline)) return; ctx.Timeline.InsertOnSubmit(timeline); ctx.SubmitChanges(); } catch (Exception) { CurrentSession.Logger.Error("Group not found in _cacheGroup: {0}", e.Group.Name); throw; } } } }
private void detach_Timeline(Timeline entity) { this.SendPropertyChanging(); entity.Group = null; }
private void attach_Timeline(Timeline entity) { this.SendPropertyChanging(); entity.Group = this; }
partial void DeleteTimeline(Timeline instance);
partial void UpdateTimeline(Timeline instance);
partial void InsertTimeline(Timeline instance);