예제 #1
0
 partial void DeleteIdea(Idea instance);
예제 #2
0
        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;
            }
        }
예제 #3
0
 partial void UpdateIdea(Idea instance);
예제 #4
0
 partial void InsertIdea(Idea instance);
예제 #5
0
		private void detach_Ideas(Idea entity)
		{
			this.SendPropertyChanging();
			entity.Category = null;
		}
예제 #6
0
		private void attach_Ideas(Idea entity)
		{
			this.SendPropertyChanging();
			entity.Category = this;
		}
예제 #7
0
		private void attach_Ideas(Idea entity)
		{
			this.SendPropertyChanging();
			entity.Status = this;
		}