Exemplo n.º 1
0
        protected override void Seed(TicketDeskContext context)
        {
            var demoMode = ConfigurationManager.AppSettings["ticketdesk:DemoModeEnabled"];

            if (!string.IsNullOrEmpty(demoMode) && demoMode.Equals("true", StringComparison.InvariantCultureIgnoreCase))
            {
                DemoDataManager.SetupDemoData(context);
            }

            base.Seed(context);
        }
Exemplo n.º 2
0
        protected override void Seed(TdDomainContext context)
        {
            var demoMode = ConfigurationManager.AppSettings["ticketdesk:DemoModeEnabled"];

            if (!context.Projects.Any())
            {
                context.Projects.Add(new Project()
                {
                    ProjectName = "Default", ProjectDescription = "Default project"
                });
            }
            if (!string.IsNullOrEmpty(demoMode) && demoMode.Equals("true", StringComparison.InvariantCultureIgnoreCase))
            {
                DemoDataManager.SetupDemoData(context);
            }

            base.Seed(context);
        }