예제 #1
0
        /// <summary>
        /// 判断是否存在。
        /// </summary>
        /// <param name="type">指定对象类型。</param>
        /// <returns>操作实例。</returns>
        public DbMaintenanceOperateBase Exsit(Type type)
        {
            var table = _Metadata.Table(type);

            return(new DbObjectExsitOperate(_Context, type, EDatabaseObject.Table)
            {
                Name = table.Name,
                Schema = table.Schema
            });
        }
예제 #2
0
 /// <summary>
 /// 判断指定的数据表是否存在。
 /// </summary>
 /// <param name="type">指定对象类型。</param>
 /// <param name="name">操作对象名称。</param>
 /// <returns>操作实例。</returns>
 public DbMaintenanceOperateBase TableIsExsit(Type type, DbName name = null)
 {
     if (name == null)
     {
         var table = _Metadata.Table(type);
         name = DbName.Create(table.Name, table.Schema);
     }
     return(new DbObjectIsExsitOperate(_Context, type, EOperateType.TableIsExsit, name));
 }