using DbContextLib; using Entities; using Microsoft.EntityFrameworkCore; namespace StubbedContextLib; public class NotificationStubbedContext : HeartRateStubbedContext { public NotificationStubbedContext() :base() { } public NotificationStubbedContext(DbContextOptions options) :base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity().HasData( new NotificationEntity { IdNotif = 1, Message = "You have a new activity to check", Date = new DateTime(2023, 12, 25, 13, 00, 40), Statut = true, Urgence = "A" }, new NotificationEntity { IdNotif = 2, Message = "You have a new athlete to check", Date = new DateTime(2023, 12, 26, 13, 10, 40), Statut = false, Urgence = "3" }, new NotificationEntity { IdNotif = 3, Message = "You have a new heart rate to check", Date = new DateTime(2023, 12, 26, 16, 10, 04), Statut = true, Urgence = "2" }, new NotificationEntity { IdNotif = 4, Message = "You have a new data source to check", Date = new DateTime(2024, 01, 12, 09, 30, 50), Statut = false, Urgence = "1" }, new NotificationEntity { IdNotif = 5, Message = "You have a new notification to check", Date = new DateTime(2024, 02, 22, 12, 10, 00), Statut = true, Urgence = "3" } ); } }