Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle provider support #232

Merged
merged 1 commit into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/EntityFrameworkCore.Generator.Core/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ private string ResolveConnectionString(DatabaseOptions database)
case DatabaseProviders.Sqlite:
ConfigureSqliteServices(services);
break;
case DatabaseProviders.Oracle:
ConfigureOracleServices(services);
break;
default:
throw new NotSupportedException($"The specified provider '{provider}' is not supported.");
}
Expand Down Expand Up @@ -452,5 +455,11 @@ private void ConfigureSqliteServices(IServiceCollection services)
var designTimeServices = new Microsoft.EntityFrameworkCore.Sqlite.Design.Internal.SqliteDesignTimeServices();
designTimeServices.ConfigureDesignTimeServices(services);
}

private void ConfigureOracleServices(IServiceCollection services)
{
var designTimeServices = new Oracle.EntityFrameworkCore.Design.Internal.OracleDesignTimeServices();
designTimeServices.ConfigureDesignTimeServices(services);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.2" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="5.21.1" />
<PackageReference Include="YamlDotNet" Version="9.1.4" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public enum DatabaseProviders
/// <summary>
/// The sqlite provider
/// </summary>
Sqlite
Sqlite,

/// <summary>
/// The Oracle provider
/// </summary>
Oracle
}
}