Пример #1
0
        public bool PopulateStatusTable()
        {
            try
            {
                var statuses = new List<Status>();

                var status = new Status { Id = 1, Name = "In Progress", Description = "Description Description Description Description Description" };
                statuses.Add(status);

                status = new Status { Id = 2, Name = "Games", Description = "Description Description Description Description Description" };
                statuses.Add(status);

                status = new Status { Id = 3, Name = "Other", Description = "Description Description Description Description Description" };
                statuses.Add(status);

                _context.Status.InsertAllOnSubmit(statuses);
                _context.SubmitChanges();

                return true;
            }
            catch (Exception ex)
            {
                if (System.Diagnostics.Debugger.IsAttached)
                {
                    MessageBox.Show(ex.Message);
                }
                return false;
            }
        }
Пример #2
0
 partial void UpdateStatus(Status instance);
Пример #3
0
 partial void DeleteStatus(Status instance);
Пример #4
0
 partial void InsertStatus(Status instance);