using GreadyPoang.EntityLayer; using Microsoft.EntityFrameworkCore; namespace GreadyPoang.DataLayer.Database { public class DataContext : DbContext { public DataContext(DbContextOptions options) : base(options) { } //public DbSet Users => Set(); public DbSet Participants { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity().HasData( new Participant { ParticipantId = 1, FirstName = "John", LastName = "Doe", Email = "John.Doe@gmail.com" }, new Participant { ParticipantId = 2, FirstName = "Jane", LastName = "Black", Email = "jb@gmail.com" }, new Participant { ParticipantId = 3, FirstName = "Mary", LastName = "White", Email = "mw@gmail.com" } ); } } }