partial void DeleteIdea(Idea instance);
public bool PopulateIdeasTable() { try { var ideas = new List<Idea>(); var idea = new Idea { Id = 1, Name = "Idea 1", Description = "Description Description Description Description Description", CategoryId = 1, StatusId = 3, DateAdded = DateTime.Now, DateUpdated = DateTime.Now }; ideas.Add(idea); idea = new Idea { Id = 2, Name = "Idea 2", Description = "Description Description Description Description Description", CategoryId = 2, StatusId = 1, DateAdded = DateTime.Now, DateUpdated = DateTime.Now }; ideas.Add(idea); idea = new Idea { Id = 3, Name = "Idea 3", Description = "Description Description Description Description Description", CategoryId = 3, StatusId = 2, DateAdded = DateTime.Now, DateUpdated = DateTime.Now}; ideas.Add(idea); _context.Ideas.InsertAllOnSubmit(ideas); _context.SubmitChanges(); return true; } catch (Exception ex) { if (System.Diagnostics.Debugger.IsAttached) { MessageBox.Show(ex.Message); } return false; } }
partial void UpdateIdea(Idea instance);
partial void InsertIdea(Idea instance);
private void detach_Ideas(Idea entity) { this.SendPropertyChanging(); entity.Category = null; }
private void attach_Ideas(Idea entity) { this.SendPropertyChanging(); entity.Category = this; }
private void attach_Ideas(Idea entity) { this.SendPropertyChanging(); entity.Status = this; }