Exemplo n.º 1
0
 /// <summary>
 /// determine whether data is exist
 /// </summary>
 /// <param name="cmd">command</param>
 /// <returns>whether data is exist</returns>
 public static async Task <bool> QueryAsync(ICommand cmd)
 {
     if (cmd?.IsObsolete ?? true)
     {
         return(false);
     }
     return(await CommandExecuteManager.QueryAsync(cmd).ConfigureAwait(false));
 }
Exemplo n.º 2
0
 /// <summary>
 /// query
 /// </summary>
 /// <typeparam name="T">data type</typeparam>
 /// <param name="cmd">query command</param>
 /// <returns>datas</returns>
 public static async Task <IEnumerable <T> > QueryAsync <T>(ICommand cmd)
 {
     if (cmd?.IsObsolete ?? true)
     {
         return(new List <T>(0));
     }
     return(await CommandExecuteManager.QueryAsync <T>(cmd).ConfigureAwait(false));
 }