Added versioning to the API, created namespace for the Reposiorites, Changed the StoreContexts to Repositories, moved the Contexts class to another namespace. #37

This commit is contained in:
amazing-username
2019-05-28 23:36:56 +00:00
parent 9ad620db06
commit 42facee883
32 changed files with 183 additions and 167 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using MySql.Data;
using MySql.Data.EntityFrameworkCore;
using MySql.Data.MySqlClient;
using Icarus.Models;
namespace Icarus.Database.Contexts
{
public class ArtistContext : DbContext
{
public DbSet<Artist> Artists { get; set; }
public ArtistContext(DbContextOptions<ArtistContext> options)
: base (options)
{ }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Artist>()
.ToTable("Artist");
}
}
}