Changed parts of how data project stucture

This commit is contained in:
2019-04-22 22:46:39 +00:00
parent 83385a66c7
commit 49f6ee5542
13 changed files with 23 additions and 99 deletions

View File

@@ -0,0 +1,24 @@
using BrightGlimmer.Data.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
namespace BrightGlimmer.Data
{
public class SqliteContext : DbContext
{
public SqliteContext(DbContextOptions<SqliteContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Student>()
.HasMany(x => x.Phones);
}
public DbSet<Student> Students { get; set; }
}
}