private static ILendingLibraryContext SetContextWithDtos(ILendingLibraryContext context, List<ItemDto> items) { var dbset = new IDbSetSubstituteBuilder<ItemDto>(); var dbSet = dbset.WithDataStore(new ObservableCollection<ItemDto>(items)).Build(); context.Items.Returns(dbSet); return context; }
private static ILendingLibraryContext SetContextWithDtos(ILendingLibraryContext context, List<PersonDto> people) { var dbset = new IDbSetSubstituteBuilder<PersonDto>(); var dbSet = dbset.WithDataStore(new ObservableCollection<PersonDto>(people)).Build(); context.People.Returns(dbSet); return context; }