Sample ASP.NET Core 6.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
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.
 
 
 
 
 

29 lines
956 B

using Microsoft.eShopWeb.ApplicationCore.Helpers.Query;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.UnitTests.ApplicationCore.Helpers.Query;
using System;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.UnitTests.Builders
{
public class IncludeQueryBuilder
{
public IncludeQuery<Person, List<Person>> WithCollectionAsPreviousProperty()
{
var pathMap = new Dictionary<IIncludeQuery, string>();
var query = new IncludeQuery<Person, List<Person>>(pathMap);
pathMap[query] = nameof(Person.Friends);
return query;
}
public IncludeQuery<Book, Person> WithObjectAsPreviousProperty()
{
var pathMap = new Dictionary<IIncludeQuery, string>();
var query = new IncludeQuery<Book, Person>(pathMap);
pathMap[query] = nameof(Book.Author);
return query;
}
}
}