Base solution for your next web application
Open Closed

Oracle Database #4567


User avatar
0
registosglintt created

hi,

I want to migrate my database from mysql to oracle. I followed the next steps:

1- I install the Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework nuget packages into your .EntityFramework and .Web projects.

2- I change myconnection string in the web.config file in order to work with my Oracle database:

<connectionStrings> <add name="Abp.Redis.Cache" connectionString="localhost" /> <add name="Default" providerName="Oracle.ManagedDataAccess.Client" connectionString="Data Source=SERVER:PORT/DB;User ID=;Password=;" /> </connectionStrings>

Note: I didn't change the constructor in the (Configuration.cs) file : public Configuration() > {

       AutomaticMigrationsEnabled = false;
       ContextKey = "GlinttAccessManagement";

       //SetSqlGenerator("MySql.Data.MySqlClient", new MySQLGenerator());
   }

When I run the following command to add a migration for Oracle "Add-Migration "AbpZero_Initial", I have the following error:

System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Oracle.ManagedDataAccess.Client.OracleException,Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342'.

Thanks in advice


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi,

    seems like an Oracle Provider issue...

    See this <a class="postlink" href="https://stackoverflow.com/questions/17685512/ef-4-4-model-changes-not-syncing-with-the-database">https://stackoverflow.com/questions/176 ... e-database</a>

    Can you post the problem to the Oracle Forum as well. <a class="postlink" href="https://community.oracle.com/search.jspa?q=Type+is+not+resolved+for+member+ManagedDataAccess">https://community.oracle.com/search.jsp ... DataAccess</a>

    Assuming you speka Portugese :) <a class="postlink" href="https://pt.stackoverflow.com/questions/220381/entity-framework-com-oracle">https://pt.stackoverflow.com/questions/ ... com-oracle</a>

  • User Avatar
    0
    registosglintt created

    Hi alper,

    Thanks you for your reply :)

    To exceed this problem, i needed to install Oracle.ManagedDataAccess.dll to my GAC (Global Assembly Cache). And How?

    Oracle.ManagedDataAccess.dll can be found in your nuget package lib directory (mine was .\packages\Oracle.ManagedDataAccess.12.1.2400\lib\net40)

    C:\DOTNET\Modules\Html\GlinttAccessManagement\src\packages\Oracle.ManagedDataAccess.12.2.1100\lib\net40>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools/gacutil.exe" /i .\Oracle.ManagedDataAccess.dll
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
    Copyright (c) Microsoft Corporation.  All rights reserved.
    
    Assembly successfully added to the cache
    
  • User Avatar
    0
    alper created
    Support Team

    I think it comes with FluentMigrator