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

CoreFX implications #8

Closed
martinjw opened this issue Jan 7, 2016 · 11 comments
Closed

CoreFX implications #8

martinjw opened this issue Jan 7, 2016 · 11 comments
Assignees

Comments

@martinjw
Copy link
Owner

martinjw commented Jan 7, 2016

CoreFX won't have DataTables, but they are replacing DbConnection.GetSchema which is the core of dbSchemaReader.

CoreFX issue: https://github.com/dotnet/corefx/issues/3423
and https://github.com/dotnet/corefx/issues/5024

The current proposal looks like our data schema model, which is promising. This library could then depend on the CoreFx model and schema reading (a more solid base than the existing GetSchema datatables).

We'll see what the final version looks like before deciding whether we wrap it with our model, or extend their model. Whichever, this library could potentially be a good bridge to support both older full framework and CoreFx.

Not looking forward to the conditional compilation directives though.

@martinjw martinjw self-assigned this Jan 7, 2016
@martinjw
Copy link
Owner Author

Started work on v2.0 based on RC2. Very early days, but some design notes...

  • Model is simplified, removing circular references (makes some things a little harder, but xmlserialization is now possible)
  • Completely custom schema reading must be built for each client (instead of relying on provider's defaults). More work, but the sql can be more efficient, and async may be possible (for .net4.5+).
  • Some providers may be problematic (Oracle's BindByName, discovered by reflection).
  • The higher level functionality - CodeGen, SqlGen, Compare - uses the same model so should not have much change. I hope.
  • Using project.json with frameworks "net35", "net40", "net45" and "netstandard1.5".
  • VS2008 solution/projects gone. Only VS2015 (with Core Preview1+). The Core stuff can't be used in old Visual Studios
  • Test project is now XUnit (no more MsTest/NUnit dual testing)
  • Viewer will probably remain as a net35/net45 Windows Forms, but VS tooling doesn't seem to support mixed solutions yet. This may have to wait until Visual Studio 15, I guess next year.

@martinjw
Copy link
Owner Author

martinjw commented Jul 22, 2016

  • Test projects not converted, and VS tooling has been too unstable. Will wait until VS 15 (2017?), but for now there are 2 solutions, a VS 2015/.net 4.5 legacy solution, and a Core tooling RC2 solution with scraper and a minimal test project.

https://github.com/martinjw/dbschemareader/releases/tag/2.0.0

Merge into master this weekend.

@martinjw
Copy link
Owner Author

Documentation on netstandard: https://dbschemareader.codeplex.com/wikipage?title=NetStandard

@martinjw
Copy link
Owner Author

Merged, pushed to Codeplex mirror and Nuget.

To do:

  • CodeGen for EF Core
  • XmlSerialization is possible, but some circular references are avoided with XmlIgnore. Provide a helper method to hook up the model after deserialization.
  • Consider DB2 support in Core. It's in EF Core's roadmap (even if IBM doesn't seem to be doing anything with .net Core yet). Not iSeries...

@martinjw
Copy link
Owner Author

martinjw commented Mar 6, 2017

Visual Studio 2017 is released March 7 2017. Next step is to upgrade the DatabaseSchemaReaderCore.sln/projects to VS2017 csproj format. Existing non-core project will probably be named "DatabaseSchemaReader2015.sln".

@martinjw
Copy link
Owner Author

martinjw commented Mar 7, 2017

For my reference...

Trial conversion with Visual Studio 2017RC works.

"dotnet build" command line fails for .net 3.5 because of this issue:
dotnet/msbuild#1333

For command line, the full msbuild works (only the 2017 version, obviously; this must be what VS uses)
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MsBuild.exe" DatabaseSchemaReader.csproj /p:TargetFramework=net35

Will redo when I have the VS2017 RTM.

@martinjw
Copy link
Owner Author

VS2017/Core+multi-targeting version added (solution DatabaseSchemaReader.sln)
Separate VS2015/non-Core version added (solution DatabaseSchemaReader2015.sln)

Appveyor now has VS2017 image, but no database services, so build is still failing. Just waiting on appveyor now...

@vhatsura
Copy link
Contributor

Do you have any updates?

@martinjw
Copy link
Owner Author

Core/netstandard 1.5 is working fine
Creating the reader is a little different to full framework, and it excludes some features. https://github.com/martinjw/dbschemareader/wiki/netcore

Core/netstandard 2.0 just added (yesterday...). Shortly I will enable some of the excluded features (reading data, stored procedures).

The invocation will remain different between core and full framework. DbProviderFactories doesn't exist in netstandard 2 due to the completely different configuration model (although there is a stub DbProviderFactory).

@vhatsura
Copy link
Contributor

Thanks, sounds good.

@martinjw
Copy link
Owner Author

Support for both netstandard 1.5 and extra APIs for netstandard 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants