I use Web api to retrieve data from the database. I only have 1 table \"tblMessage\" and want to get data from that table.
I set everything up but then when I run th
I had the same problem and this is the solution I found
After updating the Entity Data Model you have to set ProxyCreationEnabled to false in your Model
Configuration.ProxyCreationEnabled = false;
My example:
public partial class EventsEntities : DbContext
{
public EventsEntities()
: base("name=EventsEntities")
{
Configuration.ProxyCreationEnabled = false;
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
}