Added User Context #24

This commit is contained in:
amazing-username
2019-04-21 17:54:18 -04:00
parent 664b8234c2
commit 4ba342b625
9 changed files with 200 additions and 166 deletions
+27
View File
@@ -0,0 +1,27 @@
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 UserContext : DbContext
{
public DbSet<User> Users { get; set; }
public UserContext(DbContextOptions<UserContext> options)
: base(options)
{ }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>();
}
}
}