c# - ASP.net MVC 4 Creating new controller issue 'unable to retrieve metadata' -


i'm trying add new controller in project got error :

unable retrieve metadata 'mvcapplication1.models.region" object reference not set instance of object. 

and this's connection string:

<`add name="entitiesregion" connectionstring="metadata=res://*/models.region.csdl|res://*/models.region.ssdl|res://*/models.region.msl;provider=oracle.dataaccess.client;provider connection string=&quot;data source=localhost:1521;password=1234;user id=test&quot;" providername="system.data.entityclient" />` 

and her's content of region.context.cs :

namespace mvcapplication1.models {     using system;     using system.data.entity;     using system.data.entity.infrastructure;      public partial class entitiesregion : dbcontext     {         public entitiesregion()             : base("name=entitiesregion")         {         }          protected override void onmodelcreating(dbmodelbuilder modelbuilder)         {             throw new unintentionalcodefirstexception();         }          public dbset<region> region { get; set; }     } } 

also i'm using oracle database , entity framework 5. please.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -