I am using the JetEntityFrameworkProvider
I am trying to connect to an MS Access file (it has extension .sep but it is indeed an access file). I know JetEntityFrameworkProvider does support DB first but I should be able to manually create the models that I need. (Correct ?)
I am trying to define the connection string and provider in code, but it is not working. When I run it I receive the following error
System.Data.OleDb.OleDbException: 'Could not find installable ISAM.'
Context Class
public class ProjectContext : DbContext
{
private DbConnection con = new JetConnection();
public ProjectContext() : base(new JetConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source = 'C:\Test-Project.sep'; providerName = JetEntityFrameworkProvider; User Id = Admin; Jet OLEDB:Database Password = SEEME;""), true)
{
}
public DbSet<Component> Components { get; set; }
}
Entity Class
public class Component
{
[Key]
[Column("Counter")]
public int Id { get; set; }
[Column("Name")]
public string Name { get; set; }
}
Remove providerName = JetEntityFrameworkProvider;
from the connection string and try again with just this:
Provider=Microsoft.Jet.OLEDB.4.0; Data Source = 'C:\Test-Project.sep'; User Id = Admin; Jet OLEDB:Database Password = SEEME;"