コード例 #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);
        }
コード例 #2
0
ファイル: Configuration.cs プロジェクト: vik0803/TicketDesk-1
        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);
        }