Error during scaffolding wit .net-core 3

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Hudson_Hawk
Posts: 1
Joined: Thu 14 Nov 2019 11:36

Error during scaffolding wit .net-core 3

Post by Hudson_Hawk » Thu 14 Nov 2019 11:41

I am trying to use .net-core 3 with Devart.Data.Oracle.EFCore by this article: https://www.devart.com/dotconnect/oracl ... html#nuget

I created new project, installed packages as the article said but Scaffolding ends up with an error:
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Diagnostics.LoggingDefinitions' while attempting to activate 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.RelationalScaffoldingModelFactory'.
My Scaffold cmd:

Code: Select all

Scaffold-DbContext "User Id=<user>;
Password=<pswd>;
Server=<IP>;
Direct=True;
Sid=<db>;
Port=<port>;
license key=<reallyLoooongKey>" Devart.Data.Oracle.Entity.EFCore -Tables <FooTable>
My .csproj:

Code: Select all

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Devart.Data.Oracle.EFCore" Version="9.9.872" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

</Project>
Does anyone else experienced this? Thank you

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error during scaffolding wit .net-core 3

Post by Shalex » Fri 15 Nov 2019 12:32

The bug with using Scaffold-DbContext in EF Core 3 is fixed. The internal build with the fix is available at https://download.devart.com/nuget_oracle_9_9_883.zip.

As a workaround with a current public build, you can use Entity Developer (Add > New item > ASP.NET Core > Devart EF Core Model, *.efml) that is a visual designer (Database First / Model First) for EF Core.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error during scaffolding wit .net-core 3

Post by Shalex » Thu 21 Nov 2019 18:05

New build of dotConnect for Oracle 9.9.887 is available for download now: viewtopic.php?f=1&t=39576.

Post Reply