This discussion is archived
4 Replies Latest reply: May 31, 2013 3:28 AM by MonicaR. RSS

mvc with oracle entity framework

oradbuser Newbie
Currently Being Moderated
Hi,

I am new to both MVC and Oracle EF...i have installed the necessary components (ODAC beta 3) and tried out the tutorial that oracle has put up and was able to successfully finish it...
Now i want to create a new MVC 3 app (based on MVC Movie tutorial available online) ...

I have a model generated from my oracle database..however when i add a controller in MVC, the controller does not seem to recognize my model..What do i need to do so that controller can recognize the model that i generated from oracle database..????

Is there an example out there that builds an asp.net MVC app using oracle entity framework??

Thanks.
  • 1. Re: mvc with oracle entity framework
    1004435 Newbie
    Currently Being Moderated
    I had same problem. Is there any solution bout this problem?

    Regards,
    Azl
  • 2. Re: mvc with oracle entity framework
    Tridus Journeyer
    Currently Being Moderated
    I've built several MVC apps using it. Not sure why it's not recognizing it, do you have the model in another namespace or something like that?
  • 3. Re: mvc with oracle entity framework
    941293 Newbie
    Currently Being Moderated
    After you generated the Model class, did you rebuild the solution? I think that you need to rebuild it before adding controller.
  • 4. Re: mvc with oracle entity framework
    MonicaR. Newbie
    Currently Being Moderated
    Hello,
    is a week that I document but I still have a bit of confusion.
    Work on Oracle 11g with VS2010 I installed ODTwithODAC112030.
    I have to make a data entry form after the registration of an account.
    Can I create an application with MVC and EntityFramework then using Razor for pages CSHTML?.

    WHAT HAVE I DONE:
    1) Creating the Oracle schema QUESTIONARIO.
    2) Execution of InstallAllOracleASPNETProviders.sql
    3) Create application with MVC 3
    4) Insert the web.config connection parameters
    <connectionStrings>
        <add name="OraQuestConnString" connectionString="DATA SOURCE=...;....;USER ID=QUESTIONARIO;PASSWORD=*****" providerName="Oracle.DataAccess.Client" />
    5) Insertion of the parameters in the web.config for the management of user profiles
    <membership defaultProvider="OracleMembershipProvider">
    <profile>
            <providers>
              <clear />
              <add name="OracleProfileProvider" type="Oracle.Web.Profile.OracleProfileProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraQuestConnString" applicationName="questionario_casa_ufficio" />
            </ Providers>
          </ Profile>
          <roleManager enabled="true" defaultProvider="OracleRoleProvider"> .......
    6) The application works and I registered users ORA_ASPNET_USERS etc..
    7) I have created the table "Questionnaire" in the DB
    8) I have created the Model of table "Questionnaire"
    9) I created the corresponding Controller and the Views pages with Razor who created in the "Views/Questionnaire" directory all management pages (Index.cshtml - Create.cshtml - Edit.cshtml - Delete.cshtml)
    10) when the application starts tells me I can not open the databasel SQL-Server, I suppose that it work only with SQL Server!! Or did I do something wrong?
    11) Then I create the Model from DATABASE using "ADO. NET Entity Data Model"
    12) But I did not understand if I can use the EDMX Model to create pages with Razor or with another tool.
    13) Is there an automated way to create pages of data management starting from the Model EMDX or do I have to create them all manually?

    Please help me.
    Thank you very much

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points