Changed parts of how data project stucture

This commit is contained in:
Giovani
2019-04-22 22:46:39 +00:00
parent 4e4fa572b7
commit 4074d101b2
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; }
}
}