Provided solution for Migrations. Will test on the server #13

This commit is contained in:
amazing-username
2019-04-14 18:12:10 -04:00
parent 3d5e776422
commit 0c47da3665
2 changed files with 36 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using MySql.Data;
using MySql.Data.EntityFrameworkCore.Extensions;
using MySql.Data.MySqlClient;
using Icarus.Models;
namespace Icarus.Models.Context
{
public class SongContext : DbContext
{
public DbSet<Song> Songs { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Song>();
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseMySQL("server=;database=;user=;password=");
}
}
}