File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/EFCore.Ydb/src/Extensions Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ public static DbContextOptionsBuilder UseYdb(
39
39
return optionsBuilder ;
40
40
}
41
41
42
+ public static DbContextOptionsBuilder < TContext > UseYdb < TContext > (
43
+ this DbContextOptionsBuilder < TContext > optionsBuilder ,
44
+ string ? connectionString ,
45
+ Action < YdbDbContextOptionsBuilder > ? ydbOptionsAction = null )
46
+ where TContext : DbContext
47
+ => ( DbContextOptionsBuilder < TContext > ) UseYdb (
48
+ ( DbContextOptionsBuilder ) optionsBuilder , connectionString , ydbOptionsAction ) ;
49
+
50
+ public static DbContextOptionsBuilder < TContext > UseYdb < TContext > (
51
+ this DbContextOptionsBuilder < TContext > optionsBuilder ,
52
+ DbConnection connection ,
53
+ Action < YdbDbContextOptionsBuilder > ? ydbOptionsAction = null )
54
+ where TContext : DbContext
55
+ => ( DbContextOptionsBuilder < TContext > ) UseYdb (
56
+ ( DbContextOptionsBuilder ) optionsBuilder , connection , ydbOptionsAction ) ;
57
+
42
58
// TODO: Right now there are no arguments for constructor, so probably it's ok
43
59
private static YdbOptionsExtension GetOrCreateExtension ( DbContextOptionsBuilder options )
44
60
=> options . Options . FindExtension < YdbOptionsExtension > ( ) ?? new YdbOptionsExtension ( ) ;
You can’t perform that action at this time.
0 commit comments