Initial Commit ...
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using MySql.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class DbContextOptionExtensions {
|
||||
/// <summary>
|
||||
/// convert dynamic object to MySqlDbContextOptionBuilder ...
|
||||
/// Only Used in EFCore ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static Action<MySQLDbContextOptionsBuilder> ToMySQLDbContextOptionsBuilder (
|
||||
this Action<dynamic> source
|
||||
) {
|
||||
return ((Action<MySQLDbContextOptionsBuilder>) source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// convert dynamic object to SqliteDbContextOptionBuilder ...
|
||||
/// Only Used in EFCore ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static Action<SqliteDbContextOptionsBuilder> ToSqliteDbContextOptionsBuilder (
|
||||
this Action<dynamic> source
|
||||
) {
|
||||
return ((Action<SqliteDbContextOptionsBuilder>) source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// convert dynamic object to SqlServerDbContextOptionBuilder ...
|
||||
/// Only Used in EFCore ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static Action<SqlServerDbContextOptionsBuilder> ToSqlServerDbContextOptionsBuilder (
|
||||
this Action<dynamic> source
|
||||
) {
|
||||
return ((Action<SqlServerDbContextOptionsBuilder>) source);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user