I'm trying to get my code to run, but I'm not getting through this Error
Severity Code Description Project File Line Error CS0311 The type 'InternalControl.Migrations.InternalControl.IntContext' can not be used as the 'TContext' type parameter in the generic type or method 'DbMigrationsConfiguration'. There is no implicit reference conversion from 'InternalControl.Migrations.InternalControl.ControlIntContext' to 'System.Data.Entity.DbContext'. F: \ Documents and Settings \ Visual Studio 2015 \ Projects \ Internal Control \ Internal Control \ Migrations \ Configuration.cs 6
using ControleInterno.Model;
using System.Data.Entity;
namespace ControleInterno
{
class ControleIntContexto : DbContext
{
public ControleIntContexto()
{
Configuration.LazyLoadingEnabled = false;
}
public DbSet<Produto> Produtos { get; set; }
}
}
Follow the code in the Configuration.cs file
namespace ControleInterno.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<ControleInterno.ControleIntContexto>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
}
protected override void Seed(ControleInterno.ControleIntContexto context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data. E.g.
//
// context.People.AddOrUpdate(
// p => p.FullName,
// new Person { FullName = "Andrew Peters" },
// new Person { FullName = "Brice Lambson" },
// new Person { FullName = "Rowan Miller" }
// );
//
}
}
}