-
Notifications
You must be signed in to change notification settings - Fork 39
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
EF Core 7 support #132
Comments
@nicovil Use this topic for any EF 7 questions |
@ChrisJollyAU I just cloned your branch (I didn't knew you had one for .net 7). I noticed that the dependencies.targets file is outdated, so I changed DotnetRuntimeVersion dependency from 6.0.10 to 7.0.0, updated package references to their latest versions that belongs to net 7.0 (except Microsoft.Win32.Registry that stills being in preview build for 6.0), and ran nuget update. I made a build and everything compiled flawlessly, so great work! I will be doing more tests soon. Of course there are unit tests that are not passing, but they're near 10000 unit tests failing, it's a nightmare to fix them all! |
@nicovil I had just created the branch this week. As to the test, I have around 50% pass rate. P.S. Just updated to the GA release from using the RC2 |
@ChrisJollyAU : How to migrate I'm using EntityFrameworkCore.Jet (EF7) and I have a model class with a
When creating and applying a migration involving this class the target |
@ShamilS Have had a look. Looks like the CLR type bool is currently mapped to a It would be possible to change that to map to a If using it as a number type, you can do 0,1 or NULL May need some further checking on this |
@ChrisJollyAU Thank you for your clarification. I have had a look at Is it possible to modify the current EFCore.Jet (EF7) codebase to optionally force migration procedure to set the target database field type to "Bool (Yes/No)" by using DataTypeAttibute, e.g.,
? |
Maybe. Off hand I don't think it will be too simple. Is there a specific reason you need it to be a proper MS Access Yes/No Boolean? |
@ChrisJollyAU, I don't know the reason for @ShamilS wanting a |
Sorry, I didn't reply promptly, I was busy with a project deadlines.
@ChrisJollyAU No, I can live with it. |
@PedroGGaspar No, it wasn't about storage space preservation. I missed the point, which @ChrisJollyAU pointed me to, that it would be useful to have ternary logic handled by nullable P.S. Although, if if that wouldn't break/affects heavily EntityFrameworkCore.Jet versions compatibility I'd not mind to have C#'s |
I'm getting a runtime error while trying to save simple data entity instance:
I'm getting this error for an entity type with nullable fields:
and all the data fields' values are set. This error happens in EFCore.Jet.Data.JetCommand.cs
and the ExecureNonQuery() is located in the same JetCommand.cs class but somehow can't be debugged/traced:
The SQL command built by EFCore.Jet is:
and all parameters and their values seems to be in place - stored in I'm defining MS Access backend connection as
at the top level of my sample code - and it works well for the sample data retrieval but fails for the sample data insert. When a sample class has all not-nullable data fields:
then runtime error is:
|
@ChrisJollyAU OK, I guess you mean the "Data Type Mismatch in criteria expression" for the case when all entity's fields are not-nullable? Actual SQL is
so the issue isn't that much As for "Too few parameters. Expected {x}" runtime error when an entity's fields are all nullable but values are all set before saving - has this issue also been mentioned already? |
Quick progress update
|
Hi All Another progress update
v7 Alpha 1 should appear in the daily build feed. @bubibubi or @lauxjpn Can you check out the nuget feed. It looks like the API key has expired so the script is failing to push to nuget On a different note, I do have a question regarding DateTimeOffset support. EFCore.Jet maps it to a DateTime column in the database. MS Access has a lower value of 1 Jan 100 but the EFCore tests have a lot that use |
@ChrisJollyAU I updated the nuget.org API key and reran the publishing job. The 7.0.0-alpha.1 release is now published on nuget.org, as is 6.0.0-alpha.2. I also sent you an invite to your GitHub email address for our AZDO team.
Just post me the names of two of those tests in question and I'll take a look at it. |
@lauxjpn Any test from the Gears of War test set (GearsOfWarQueryJetTest) will work. Same problem for all 1265 tests as problem comes in during the initial seeding
Haven't seen any email yet |
@lauxjpn It turns out Jet ODBC doesn't like dates before 1 Jan 1753! I don't believe there is a workaround. See also this archived KB article from 2001 https://jeffpar.github.io/kbarchive/kb/252/Q252699/ This appears to be a Jet ODBC specific issue, as switching to OleDb had more tests passing that used DateTime than with Odbc On that note the decimal type also works with OleDb but not Odbc Can I ask if there is a specific reason why the default provider is Odbc? Probably would be better to switch to OleDb as the default |
Alpha 2 is now out Notable improvements are:
|
Beta 1 is now out Improvements:
|
RC 1 is now out Improvements:
Think we are getting close to a stable release. Most fixes are starting to take a lot longer to sort out. Unless there is anything major, this should be almost ready for rtm @bubibubi @lauxjpn (And anyone else that wants to) Can you take a look at the tests and see if there is anything else of importance to fix before rtm. Most failing tests now seem to be more due to Jet limitations (concurrency, datetimeoffsets, no date before 100 years, APPLY joins etc) |
v7 RTM is out!! Improvements:
|
something wrong ❯ dotnet add package EntityFrameworkCore.Jet.Odbc --version 7.0.0 My project is net7.0 |
@angelofb Oh dear. It looks like nuget didn't get that one package. All the others got updated Will take a look and try to republish |
I just opened #139 which will solve the publishing issue. But publishing only |
that was quick! it is ok now, thank you! |
v7.0.2 Needed another update due to #140 The problem was that when referencing both Sql Server and Jet, there were some Fluent API extensions (for the KeyBuilder/ModelBuilder/PropertyBuilder objects) that shared the same definition (same name and parameters). To be able to support referencing Jet with other providers the extension methods have needed a name change. At this point in time it looks like it's only UseIdentityColumn(s) -> UseJetIdentityColumn(s) As a note looking at the EF Core repository, SQL Server, Cosmos and Sqlite have no extensions defined that have the same name between them |
I have legacy soft which reads database and awaits specific columns to be Access Yes/No Bools, so don't have opportunity to use boolean ClrType (which is converted to integer). Is there any way I can resolve the issue and mark field as 'bit'? |
@CodeAndRun You should be fine with boolean clr. Can I ask are you starting with database first and wanting to scaffold to a c# model? Or are you starting with the classes for thee model and want to create the database from that? If database first - scaffolding will automatically map it to a boolean clr. (MS Access Yes/No is a If you are code first, you should be able to do this if you add the following annotation to your property
so you end up with something like
In fact if you look at the test the above is done like that in |
In my case I am building database from scratch (with model classes) and feeding it to legacy soft
This helps, thanks! It makes field logical, not integer. |
Just remember there is only true and false, no Also just a side note, don't know if you asked it here under EF Core 7 for as specific reason or not, but there is a v8 and fairly soon a v9. Many new improvements and fixes in it |
With .Net 7 and Entity Framework Core 7 out now I have created this topic for any questions regarding the status of EFCore.Jet for EF 7
The text was updated successfully, but these errors were encountered: