Вы можете использовать DbContext конструктор и отправить имя connectionString.
namespace Dersanem
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class DERSANEM_MASTEREntities : DbContext
{
public DERSANEM_MASTEREntities()
: base("MyDbConnection")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public DbSet<sysdiagrams> sysdiagrams { get; set; }
public DbSet<T_HATA_LOG> T_HATA_LOG { get; set; }
public DbSet<T_MUSTERILER> T_MUSTERILER { get; set; }
}
}
Дополнительная информация:
//
// Summary:
// Constructs a new context instance using the given string as the name or connection
// string for the database to which a connection will be made. See the class remarks
// for how this is used to create a connection.
//
// Parameters:
// nameOrConnectionString:
// Either the database name or a connection string.
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public DbContext(string nameOrConnectionString);