private TenantControl getTenantControl()
        {
            
            TenantControl tenant = new TenantControl
            {
                Id = -1,
                TenantUser = "******",
                Theme = "default",
                TenantSchema = "default"
            };

            if (Request.IsAuthenticated)
            {
                using (var db = new DefaultConnection())
                {
                    string username = User.Identity.Name.Trim().ToLower();
                    tenant = db.TenantControl.FirstOrDefault(c => c.TenantUser.ToLower() == username);
                }
            }
            return tenant;
        }
        public ActionResult Index()
        {
            TenantControl tenant = new TenantControl
            {
                Id = -1,
                TenantUser = "******",
                Theme = "default",
                TenantSchema = "default"
            };

            if (Request.IsAuthenticated) {
                using (var db = new DefaultConnection()) {
                    string username = User.Identity.Name.Trim().ToLower();
                    var idata = db.TenantControl.FirstOrDefault(c => c.TenantUser.ToLower() == username);
                    if (idata != null)
                        tenant = idata;
                }
            }
            if (!tenant.TenantSchema.Equals("default"))
            {

            }
            return View(tenant);
        }