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