You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's the first time I use this EF provider to work with access databases and I'm trying to configure the database first mode, creating the edmx model from a database file which has always been used as a reference for application development and test.
I suppose the access file I'm working with was created with a fairly old version of office: it has MDB extension.
The model generated from this file contains a table whose boolean fields have been marked as primary key even though they aren't part of primary key of the table in the database.
So I tried editing the table removing some fields, and I got another strange result generating again the model: the boolean fields are not part of primary key anymore, but the fields that are part of the primary key are not defined as such in the model, only one of four fields has been marked as primary key.
I am not able to understand why there is this behaviour, so I attach here the two database file and the screenshots of the models generated from them.
I used Microsoft JET 4.0 as a provider.
I'm still working on this project (more than .NET Core because in my "real life" I still use EF 6.2).
The problem is the informations returned from OLEDB (that depends also on OLEDB version).
I suggest to use Code First from Database approach so you can fix errors like this on classes.
Ok, thanks. I was wondering that because I saw your activity on other projects and these issues were left ignored.
Do you mean the issue is in the OLEDB which returns a kind of information schema with wrong informations?
Is there any chance to fix?
It's the first time I use this EF provider to work with access databases and I'm trying to configure the database first mode, creating the edmx model from a database file which has always been used as a reference for application development and test.
I suppose the access file I'm working with was created with a fairly old version of office: it has MDB extension.
The model generated from this file contains a table whose boolean fields have been marked as primary key even though they aren't part of primary key of the table in the database.
So I tried editing the table removing some fields, and I got another strange result generating again the model: the boolean fields are not part of primary key anymore, but the fields that are part of the primary key are not defined as such in the model, only one of four fields has been marked as primary key.
I am not able to understand why there is this behaviour, so I attach here the two database file and the screenshots of the models generated from them.
I used Microsoft JET 4.0 as a provider.
test_db_files.zip
The text was updated successfully, but these errors were encountered: