What's the difference between creating a Context with DbContext and DataContext? Is there any performance difference or best practice between one or the other?
See the examples below;
namespace _DBContext.DBase.Banco
{
public class dbContext : using System.Data.Entity.DbContext
{
public dbContext()
: base("EntityConn")
{
Database.SetInitializer<dbContext>(null);
}
public DbSet<Tabela_DocsIten> Tabela_DocsIten { get; set; }
}
}
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="MeuBD")]
public partial class ModeloColDataContext : System.Data.Linq.DataContext
{
public System.Data.Linq.Table<Tabela_DocsIten> Tabela_DocsItens
{
get
{
return this.GetTable<Tabela_DocsIten>();
}
}
}