using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using DbContextLib; using Entities; using Microsoft.EntityFrameworkCore; namespace StubbedContextLib { public class StubbedContext : LibraryContext { public List Persons { get; set; } = new List(); public List Books { get; set; } = new List(); public StubbedContext() { BookEntity b0 = new BookEntity() { Title = "test", Author = "test", Isbn = "test" }; BookEntity b1 = new BookEntity() { Title = "test2", Author = "test2", Isbn = "test2" }; Books.Add(b0); Books.Add(b1); Collection CB = new Collection(); CB.Add(b0); CB.Add(b1); Persons.Add(new PersonEntity() { FirstName = "coco", LastName = "test", Books = CB }); } } }