Exemple #1
0
        private static async Task <int> FromDBByIdAsync <T>(MiningHistoryDataContainer item, DBKey id, int offset = 0, int limit = 20)
            where T : DBQuery_MiningHistory_Select_Base <COMMON_IN_DATA_DBKeyOffsetLimit>, new()
        {
            var query = new T();

            query.IN.DBKey  = id;
            query.IN.Offset = offset;
            query.IN.Limit  = limit;

            bool result = await DBThread.Instance.ReqQueryAsync(query);

            query.OUT.Items.CopyTo(ref item);
            return(item.Count);
        }
Exemple #2
0
 public static async Task <int> FromDBByCustomerIdAsync(this MiningHistoryDataContainer item, DBKey userId, int offset = 0, int limit = 20)
 {
     return(await FromDBByIdAsync <DBQuery_MiningHistory_Select_By_UserId>(item, userId, offset, limit));
 }