public string GetData(AutoGenType type)
        {
            _appSession = new AppSession();

            _db.DisableAllFilters();
            string invoiceNumber;

            switch (type)
            {
            case AutoGenType.CustomerCode:
                invoiceNumber = AutoGenCustomerCode();
                break;

            case AutoGenType.EmployeeCode:
                invoiceNumber = AutoGenEmployeeCode();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }

            _db.EnableAllFilters();

            return(invoiceNumber);
        }
        public static void RunSeed()
        {
            CheckMultiTenantData();

            using (var context = new BusinessDbContext())
            {
                context.DisableAllFilters();

                //AddWarehouses(context);
                //AddSupplier(context);

                context.EnableAllFilters();
            }
        }
        public static void CheckMultiTenantData()
        {
            using (var context = new BusinessDbContext())
            {
                context.DisableAllFilters();

                AddFeatures(context);
                AddEdition(context);
                AddEditionFeature(context);
                AddTenant(context);
                AddCompany(context);
                AddCompanySettings(context);
                AddBranches();
                AddSubscription(context);

                context.EnableAllFilters();
            }
        }