コード例 #1
0
 public static void ExecuteDialect(this IDbVendorSelector selector, Action sqlServer, Action postgres, Action redis = null)
 {
     selector.SelectDialect(() =>
     {
         sqlServer();
         return(true);
     }, () =>
     {
         postgres();
         return(true);
     }, () =>
     {
         redis();
         return(true);
     });
 }
コード例 #2
0
 public static T SelectDialect <T>(this IDbVendorSelector selector, T sqlServer, T postgres, T redis = default) =>
 selector.SelectDialect(() => sqlServer, () => postgres, () => redis);
コード例 #3
0
 public static T SelectDialect <T>(this IDbVendorSelector selector, Func <T> sqlServer, Func <T> postgres) =>
 selector.SelectDialect(sqlServer, postgres, () => default);