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="data source=localhost:1521;password=1234;user id=test"" 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
Post a Comment