Hello ABP community,
For who it might be interested, i'm using abp & Module Zero with Oracle.
I Had a few trouble since I was using DatabaseFirst before and not CodeFirst Generation.
If you are stuck, there is some tips :
-
nuget package is the official odp.net from oracle : <a class="postlink" href="https://www.nuget.org/packages/Oracle.ManagedDataAccess.EntityFramework/12.1.21">https://www.nuget.org/packages/Oracle.M ... rk/12.1.21</a>
-
you need to delete ALL migrations files from CodeFirst & regenerate only ONE file (via add-migration).
The reason is ODP.NET does not manage well dbmigration queries as "alter column" and annotions changes. -
you need to map column types in your web config, to match .NET type to oracle type :
my current mapping is :
With all theses infos, code first works fine with oracle and you can create & seed infos via Module Zero.
3 Answer(s)
-
0
Thank you very much for information sharing :)
-
0
This seems impossible because MZ includes a field which is over 30 chars long, which Oracle won't allow. Can you confirm if you're gonna change this hikalkan?
-
0
In response to my previous message, here is the solution to avoid the 32 character name limit in Oracle.
Add this to your DbContext class.protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.HasDefaultSchema("ORACLEUSERINCAPITALLETTERS"); //short oracle names modelBuilder.Entity() .Property(t=>t.EntityTypeAssemblyQualifiedName) .HasColumnName("EntityTypeAssQualName"); modelBuilder.Entity< NotificationInfo >() .Property(t => t.EntityTypeAssemblyQualifiedName) .HasColumnName("EntityTypeAssQualName"); modelBuilder.Entity() .Property(t => t.EntityTypeAssemblyQualifiedName) .HasColumnName("EntityTypeAssQualName"); modelBuilder.Entity() .Property(t => t.EntityTypeAssemblyQualifiedName) .HasColumnName("EntityTypeAssQualName"); ...