/// <summary>
        /// 数据库设计检查
        /// </summary>
        public void RepairByDb(EntityConfig entity)
        {
            EntityDatabaseBusiness business = new EntityDatabaseBusiness
            {
                Entity = entity
            };

            business.CheckDbConfig(false);
        }
Beispiel #2
0
        /// <summary>
        /// 数据库设计检查
        /// </summary>
        public void RepairByDb()
        {
            var result = MessageBox.Show("是重构基础数据库设计,否仅检查并修改不正确的设置项", "数据库设计检查", MessageBoxButton.YesNoCancel);

            if (result == MessageBoxResult.Cancel)
            {
                return;
            }
            var tables = Context.GetSelectEntities();

            foreach (var entity in tables)
            {
                EntityDatabaseBusiness business = new EntityDatabaseBusiness
                {
                    Entity = entity
                };
                business.CheckDbConfig(result == MessageBoxResult.Yes);
            }
        }