File tree Expand file tree Collapse file tree 5 files changed +38
-17
lines changed Expand file tree Collapse file tree 5 files changed +38
-17
lines changed Original file line number Diff line number Diff line change 1+ #if EFCORE_2X
2+
3+ namespace EntityFrameworkExtras . EFCore
4+ {
5+ public static partial class DatabaseExtensions
6+ {
7+ }
8+ }
9+
10+ #endif
Original file line number Diff line number Diff line change 1+ #if EFCORE && ! EFCORE_2X
2+
3+ namespace EntityFrameworkExtras . EFCore
4+ {
5+ public static partial class DatabaseExtensions
6+ {
7+ }
8+ }
9+ #endif
Original file line number Diff line number Diff line change 1+ #if EF4 || EF5 || EF6
2+
3+ #if EF4
4+ namespace EntityFrameworkExtras
5+ #elif EF5
6+ namespace EntityFrameworkExtras . EF5
7+ #elif EF6
8+ namespace EntityFrameworkExtras . EF6
9+ #endif
10+ {
11+ public static partial class DatabaseExtensions
12+ {
13+ }
14+ }
15+ #endif
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ namespace EntityFrameworkExtras.EFCore
4343 /// <summary>
4444 /// Extension methods for the Entity Framework Database class.
4545 /// </summary>
46- public static class DatabaseExtensions
46+ public static partial class DatabaseExtensions
4747 {
4848 /// <summary>
4949 /// Executes the specified stored procedure against a database.
@@ -338,22 +338,6 @@ public static T ExecuteStoredProcedureFirstOrDefault<T>(this Database database,
338338 {
339339 return database . ExecuteStoredProcedure < T > ( storedProcedure ) . FirstOrDefault ( ) ;
340340 }
341-
342- /// <summary>
343- /// Executes the specified stored procedure against a database asynchronously
344- /// and returns the first or default value
345- /// </summary>
346- /// <typeparam name="T">Type of the data returned from the stored procedure.</typeparam>
347- /// <param name="database">The database to execute against.</param>
348- /// <param name="storedProcedure">The stored procedure to execute.</param>
349- /// <param name="cancellationToken">The cancellation token.</param>
350- /// <returns></returns>
351- public static async Task < T > ExecuteStoredProcedureFirstOrDefaultAsync < T > ( this Database database , object storedProcedure , CancellationToken cancellationToken = default )
352- {
353- var executed = await database . ExecuteStoredProcedureAsync < T > ( storedProcedure , cancellationToken ) . ConfigureAwait ( false ) ;
354-
355- return executed . FirstOrDefault ( ) ;
356- }
357341#endif
358342
359343 private static void SetOutputParameterValues ( IEnumerable < SqlParameter > sqlParameters , object storedProcedure )
Original file line number Diff line number Diff line change 1111 <ItemGroup >
1212 <Compile Include =" $(MSBuildThisFileDirectory)Attributes.cs" />
1313 <Compile Include =" $(MSBuildThisFileDirectory)ColumnInformation.cs" />
14+ <Compile Include =" $(MSBuildThisFileDirectory)DatabaseExtensions.EFCore3x.cs" />
15+ <Compile Include =" $(MSBuildThisFileDirectory)DatabaseExtensions.NetFramework.cs" />
16+ <Compile Include =" $(MSBuildThisFileDirectory)DatabaseExtensions.EFCore2x.cs" />
1417 <Compile Include =" $(MSBuildThisFileDirectory)DatabaseExtensions.cs" />
1518 <Compile Include =" $(MSBuildThisFileDirectory)ObjectContextExtentions.cs" />
1619 <Compile Include =" $(MSBuildThisFileDirectory)StoredProcedureAttribute.cs" />
You can’t perform that action at this time.
0 commit comments