0
votes

I am trying to use .net-core 3 with Devart.Data.Oracle.EFCore by this article: https://www.devart.com/dotconnect/oracle/articles/efcore-database-first-net-core.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:

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:

<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

1

1 Answers

0
votes

The bug with using Scaffold-DbContext in EF Core 3 is fixed. The internal builds with the fix are available here:

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.