private void detach_Events(Event entity) { this.SendPropertyChanging(); entity.Comment = null; }
private void attach_Events(Event entity) { this.SendPropertyChanging(); entity.Comment = this; }
partial void DeleteEvent(Event instance);
partial void UpdateEvent(Event instance);
partial void InsertEvent(Event instance);
public static void AddEvent(EventType evtype, int? commentID, int? unitID, int? modelID, string text, int userID) { var e = new Event(); if (userID == 0) e.UserID = LoggedUserID; else e.UserID = userID; e.Type = evtype; e.CommentID = commentID; e.UnitID = unitID; e.ModelID = modelID; e.Text = text; e.Time = DateTime.UtcNow; Db.Events.InsertOnSubmit(e); }