/// <summary>
 /// 等待数据初始化完成
 /// </summary>
 public static void WaitSqlLoaded()
 {
     if (!isSqlLoaded)
     {
         sqlTable.WaitLoad();
         isSqlLoaded = true;
     }
 }
示例#2
0
            /// <summary>
            /// 等待数据初始化完成
            /// </summary>
            public static void WaitSqlLoaded()
            {
                if (!isSqlLoaded)
                {
                    sqlTable /**/.WaitLoad();
                    isSqlLoaded = true;
                }
            }
        }
    }
} namespace AutoCSer.Example.OrmModel
{
    [AutoCSer.Json.Serialize]
    [AutoCSer.Json.Parse]
    [AutoCSer.BinarySerialize.Serialize(IsReferenceMember = false, IsMemberMap = false)]
    public partial class CastMember
    {
        /// <summary>
        /// 数据库表格模型
        /// </summary>
        /// <typeparam name="tableType">表格映射类型</typeparam>
        public abstract class SqlModel <tableType> : AutoCSer.Example.OrmModel.CastMember
            where tableType : SqlModel <tableType>
        {
            /// <summary>
            /// SQL表格操作工具
            /// </summary>
            protected static readonly AutoCSer.Sql.Table <tableType, AutoCSer.Example.OrmModel.CastMember> sqlTable = AutoCSer.Sql.Table <tableType, AutoCSer.Example.OrmModel.CastMember> .Get(false);

            private static bool isSqlLoaded;
            /// <summary>
            /// 等待数据初始化完成
            /// </summary>
            public static void WaitSqlLoaded()
            {
                if (!isSqlLoaded)
                {
                    sqlTable /**/.WaitLoad();
                    isSqlLoaded = true;
                }
            }