Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello

i m getting this exception in below code..plz help me out ...to understand this exceptiion


//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace DemoCustomActionPaneAndRibbon.Models
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;

public partial class NORTHWNDEntities : DbContext
{
public NORTHWNDEntities():base("name=NORTHWNDEntities")//here i m getting above exception
{
}

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}

public DbSet<Category> Categories { get; set; }
public DbSet<Customer> Customers { get; set; }
public DbSet<Order_Detail> Order_Details { get; set; }
public DbSet<Order> Orders { get; set; }
public DbSet<Product> Products { get; set; }
}
}
Posted
Comments
Sergey Alexandrovich Kryukov 29-Jan-15 2:31am    
To start with, you need to provide comprehensive exception information, by using the debugger or logging...
—SA
Member 10584788 29-Jan-15 3:01am    
ok.. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900