Giter Site home page Giter Site logo

Comments (8)

ErikEJ avatar ErikEJ commented on June 30, 2024 1

There is no cost other than time - see this PR for an example of the relatively small amount of work involved: https://github.com/ErikEJ/EFCorePowerTools/pull/885/files (ignore the changes in the EFCorePowserTools folder)

from efcorepowertools.

hatzhang avatar hatzhang commented on June 30, 2024

Thanks very much.
The initial step seems quite simple, I checked in a commit here.
I ignored the changes in EFCorePowserTools folder, also I am having issues to compile the PowerToolsExtensionPack project, I had to remove it from the solution to build.

So, what is the next step, how to test or verify the behavior, and how to make it part of this great tool.

from efcorepowertools.

ErikEJ avatar ErikEJ commented on June 30, 2024

@hatzhang Next step could be to create a PR with these initial changes. Does your provider only support EF Core 8?

After that, you can test via the EF Core 8 CLI tool, efcpt.8, by passing a connection string and provider name a command line parameters.

This file will need various updates to support the new provider: https://github.com/ErikEJ/EFCorePowerTools/blob/master/src/GUI/RevEng.Shared/Providers.cs

And the help instructions will need the new provider abbreviation added.

from efcorepowertools.

hatzhang avatar hatzhang commented on June 30, 2024

@ErikEJ I created a PR.
If I understood correctly, I should wait for the new nightly version of the ErikEJ.EFCorePowerTools.Cli which contains the change, then I can test via it? I tried build and run efcpt.8 at my local, it reports an error of Unknown provider 'KingBase'

The provider support both EF8 and EF6, but we are only going to use EF8.

I made changes to Providers.cs too, but I am not sure about the help instructions.

from efcorepowertools.

ErikEJ avatar ErikEJ commented on June 30, 2024

You do not need to wait for a Nightly build , you just need to make the CLI aware of the KingBase provider. Let me know if you need help with this

from efcorepowertools.

ErikEJ avatar ErikEJ commented on June 30, 2024

You should be able to debug efcpt.8 by passing a connection string and provider name as command line parameters in the Debug options.

from efcorepowertools.

hatzhang avatar hatzhang commented on June 30, 2024

Yes, I can debug it, with those checked-in commits, by passing connection string and a right provider alias kingbase, the CLI is now aware the KingBase provider.
I copied an efpt.config.json, which we are using right now for reverse engineering against SQLServer, and for which it worked well.
But when running against KingBase, I am getting the following error (without efpt.config.json, same error). I think this might be a provider issue? Not sure if there is a way to bypass it.

System.Resources.MissingManifestResourceException: Could not find the resource
"Kdbndp.EntityFrameworkCore.KingbaseES.Properties.KdbndpStrings.resources" among the resources
"DotNetCore.EntityFrameworkCore.KingbaseES.Properties.KdbndpStrings.resources",
"DotNetCore.EntityFrameworkCore.KingbaseES.Strings.resources" embedded in the assembly
"DotNetCore.EntityFrameworkCore.KingbaseES", nor among the resources in any satellite assemblies for the specified
culture. Perhaps the resources were embedded with an incorrect name.
at void System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(string fileName)
at ResourceSet System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture,
Dictionary<string, ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists)
at ResourceSet System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, bool createIfNotExists,
bool tryParents)
at string System.Resources.ResourceManager.GetString(string name, CultureInfo culture)
at EventDefinitionBase Kdbndp.EntityFrameworkCore.KingbaseES.Internal.KdbndpResources.<>c.b__4_0(
IDiagnosticsLogger logger)
at TValue Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized<TParam,TValue>(ref
TValue target, TParam param, Func<TParam, TValue> valueFactory)
at FallbackEventDefinition Kdbndp.EntityFrameworkCore.KingbaseES.Internal.KdbndpResources.LogFoundColumn(
IDiagnosticsLogger logger)
at void Kdbndp.EntityFrameworkCore.KingbaseES.Internal.KdbndpLoggerExtensions.ColumnFound(
IDiagnosticsLogger diagnostics, string tableName, string columnName, string dataTypeName, bool
nullable, bool identity, string defaultValue, string computedValue)
at void Kdbndp.EntityFrameworkCore.KingbaseES.Scaffolding.Internal.KdbndpDatabaseModelFactory.GetColumns(
KdbndpConnection connection, IReadOnlyList tables, string tableFilter, string internalSchemas,
HashSet enums, IDiagnosticsLogger logger)
at IEnumerable Kdbndp.EntityFrameworkCore.KingbaseES.Scaffolding.Internal.KdbndpDatabaseModelFactory.
GetTables(KdbndpConnection connection, DatabaseModel databaseModel, Func<string, string, string> tableFilter,
string internalSchemas, HashSet enums, IDiagnosticsLogger logger)
at DatabaseModel Kdbndp.EntityFrameworkCore.KingbaseES.Scaffolding.Internal.KdbndpDatabaseModelFactory.Create(
DbConnection dbConnection, DatabaseModelFactoryOptions options)
at DatabaseModel Kdbndp.EntityFrameworkCore.KingbaseES.Scaffolding.Internal.KdbndpDatabaseModelFactory.Create(string
connectionString, DatabaseModelFactoryOptions options)
at DatabaseModel RevEng.Core.TableListBuilder.GetDatabaseModel() in TableListBuilder.cs:131
at List RevEng.Core.TableListBuilder.GetTableModels() in TableListBuilder.cs:43
at void ErikEJ.EFCorePowerTools.Services.DisplayService.<>c__DisplayClass7_01.<Wait>b__0(StatusContext ctx) in DisplayService.cs:64 at Task Spectre.Console.Status.<>c__DisplayClass14_0.<Start>b__0(StatusContext ctx) in Status.cs:44 at void Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in Status.cs:79 at void Spectre.Console.Status.<>c__DisplayClass17_01.<b__0>d.MoveNext() in Status.cs:120
at void Spectre.Console.Progress.<>c__DisplayClass32_0`1.<b__0>d.MoveNext() in Progress.cs:138
at async Task Spectre.Console.Internal.DefaultExclusivityMode.RunAsync(Func<Task> func) in
DefaultExclusivityMode.cs:40
at async Task Spectre.Console.Progress.StartAsync(Func<ProgressContext, Task> action) in Progress.cs:121
at async Task Spectre.Console.Status.StartAsync(string status, Func<StatusContext, Task> func) in Status.cs:
117
at async Task Spectre.Console.Status.StartAsync(string status, Func<StatusContext, Task> action) in Status.cs:77
at void Spectre.Console.Status.Start(string status, Action action) in Status.cs:48
at T ErikEJ.EFCorePowerTools.Services.DisplayService.Wait(string message, Func doFunc) in DisplayService.cs:59
at List ErikEJ.EFCorePowerTools.HostedServices.ScaffoldHostedService.GetTablesAndViews() in
ScaffoldHostedService.cs:187
at async Task ErikEJ.EFCorePowerTools.HostedServices.ScaffoldHostedService.ExecuteAsync(CancellationToken
stoppingToken) in ScaffoldHostedService.cs:43
at async Task Microsoft.Extensions.Hosting.Internal.Host.b__15_1(IHostedService service, CancellationToken
token)
at async Task Microsoft.Extensions.Hosting.Internal.Host.ForeachService(IEnumerable services, CancellationToken
token, bool concurrent, bool abortOnFirstException, List exceptions, Func<T, CancellationToken, Task>
operation)
at void Microsoft.Extensions.Hosting.Internal.Host.g__LogAndRethrow|15_3(ref <>c__DisplayClass15_0 )
at async Task Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at async Task Microsoft.Extensions.Hosting.HostingAbstractionsHostBuilderExtensions.StartAsync(IHostBuilder
hostBuilder, CancellationToken cancellationToken)
at void ErikEJ.EFCorePowerTools.Program.<>c.<b__1_1>d.MoveNext() in Program.cs:55
at async Task ErikEJ.EFCorePowerTools.Program.MainAsync(string[] args) in Program.cs:65
at async Task ErikEJ.EFCorePowerTools.Program.Main(string[] args) in Program.cs:22

from efcorepowertools.

ErikEJ avatar ErikEJ commented on June 30, 2024

@hatzhang Yes, it is running now, this is a provider bug, cannot really assist with that.

from efcorepowertools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.