Esempio n. 1
0
        public void Test_TenantAddUpdate_Bad_3()
        {
            var model = new TenantBase();

            testContext.WriteLine($"{model.ToString()}");
            tp.TenantAddUpdate(model);
        }
Esempio n. 2
0
        public void Test_TenantAddUpdate_Bad_2()
        {
            var model = new TenantBase();
            var id    = Guid.Empty;

            model.Contact = new ContactBase()
            {
                TenantId = id, DisplayName = id.ToString()
            };
            testContext.WriteLine($"{model.ToString()}");
            tp.TenantAddUpdate(model);
        }
Esempio n. 3
0
        public static void BuildDemoData()
        {
            foreach (var t in Tenants)
            {
                var model = new TenantBase()
                {
                    _id     = t,
                    Contact = new ContactBase()
                    {
                        DisplayName = t.ToString(),
                        TenantId    = t,
                        ContactName = t.ToString()
                    },
                    Configuration = new List <KeyValuePair <string, string> >()
                    {
                        new KeyValuePair <string, string>("TenantDb", t.ToString())
                    }
                };
                Console.WriteLine(model.ToString());
                TenantProvider.TenantAddUpdate(model);
            }

            int ct = 0;

            foreach (var u in Usernames)
            {
                var model = new TenantUserProfileBase()
                {
                    UniqueUserId = u,
                    _id          = Guid.NewGuid(),
                };
                if (ct % 2 == 0)
                {
                    model.Tenants.Add(Tenants[0]);
                }
                else
                {
                    model.Tenants.Add(Tenants[1]);
                }

                model.SettingsPut("ct", ct.ToString());

                Console.WriteLine(model.ToString());

                UserProvider.Write(model);
                ct++;
            }
        }