Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Code First and Database First Entity Framework with Devart
    primarykey
    data
    text
    <p>I have one website that uses EF 4.4 (.NET 4.0 version of EF 5.0) that uses Code First against an existing database. I use the Devart oracle data provider which requires a workaround because of casing issues with the model type.</p> <p>It makes the Devart provider recognize lowercase datatypes to interpret the schema. (Or something along those lines)</p> <p>This works properly, until the control within this website, built on EF 4.1 Database First (Also against an existing database) tries to load. The Devart provider seems to be shared across the websites, and it results in errors about the provider not being able to recognize the datatypes (correctly) in all caps, because of the previous workaround to make it work in Code First.</p> <p>Is there a workaround for this, or do I have to convert the Database First approach to Code First?</p> <p>Edit: Here is the related workaround code. I seem to have lost the forum post I got it from. I believe it was on the Devart forums:</p> <pre><code> protected override void OnModelCreating(DbModelBuilder modelBuilder) { var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance; config.Workarounds.ColumnTypeCasingConventionCompatibility = true; ... initialization code here ... base.OnModelCreating(modelBuilder); } </code></pre> <p>And the related error is this:</p> <pre><code>System.Data.MetadataException: Schema specified is not valid. Errors: Model.ssdl(205,6) : error 0040: The Type CHAR is not qualified with a namespace or alias. Only primitive types can be used without qualification. Model.ssdl(206,6) : error 0040: The Type VARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification. </code></pre> <p>There are a bunch more, but they're all the same error with different lines and data types.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload