Move EF connection string to ASP.NET startup.

This commit is contained in:
2018-08-06 00:24:20 +01:00
parent bd16334ad0
commit 940bb2250a
2 changed files with 7 additions and 9 deletions

View File

@@ -37,15 +37,6 @@ namespace Cicm.Database.Models
public virtual DbSet<SoundSynths> SoundSynths { get; set; }
public virtual DbSet<StorageByMachine> StorageByMachine { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if(!optionsBuilder.IsConfigured)
{
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm");
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Admins>(entity =>