i have the following problem :
I ve succesfully connected with an Oracle DB, and i ve constructed the model using the DB first approach provided by VS 2015 Community edition.
The problem starts when i try to add a controller / view with a declared model class, and data context class.
This is my db context class:
namespace ORACLETEST3.Models
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class HREntities : DbContext
{
public HREntities()
: base("name=HREntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
//modelBuilder.Entity<>
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<BSNS_AREA> BSNS_AREA { get; set; }
public virtual DbSet<MAIN> MAINs { get; set; }
public virtual DbSet<OFFICE> OFFICEs { get; set; }
public virtual DbSet<USER_TYPE> USER_TYPE { get; set; }
public virtual DbSet<USR> USRs { get; set; }
}
}
When i try to add a view, i can -see- the data context class, but once i select one, i get an invocation error. Providing pics for reference :
If i dont select a data context class, i can add the view normally. If i do select a data context class, i get the following error:
This is what happens when i create an empty view, and try to bind the model:
@model ORACLETEST3.Models.USER_TYPE
@{
ViewBag.Title = "View";
}
<h2>View</h2>
<div>
<h4>USER_TYPE</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.DESCR)
</dt>
<dd>
@Html.DisplayFor(model => model.DESCR)
</dd>
</dl>
</div>
<p>
@Html.ActionLink("Edit", "Edit", new { id = Model.ID }) |
@Html.ActionLink("Back to List", "Index")
</p>
Is this some version mismatch thing?