You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
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<PersonEntity> Persons { get; set; } = new List<PersonEntity>();
|
|
public List<BookEntity> Books { get; set; } = new List<BookEntity>();
|
|
|
|
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<BookEntity> CB = new Collection<BookEntity>();
|
|
CB.Add(b0);
|
|
CB.Add(b1);
|
|
Persons.Add(new PersonEntity() { FirstName = "coco", LastName = "test", Books = CB });
|
|
}
|
|
|
|
}
|
|
}
|