Added Genre and Year models, Genre and Year Context, Genre and Year Stores, Genre and Year skeleton APIControllers #41 and #42

This commit is contained in:
amazing-username
2019-05-13 21:19:15 -04:00
parent d75d2924a7
commit cd2da929eb
10 changed files with 276 additions and 2 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 GenreContext : DbContext
{
public DbSet<Genre> Genres { get; set; }
public GenreContext(DbContextOptions<GenreContext> options)
: base(options)
{ }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Genre>()
.ToTable("Genre");
}
}
}