Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Task Parallelization

task-parallelization-diagram

This sample shows a task parallelization scenarion, in which different Services provide their own data for a given employee id.

The result of the scatter-gather operation is used to create a composite model containing all the data received.

class ViewModel
{
    // Unique identifier for the employee,
    // shared across services

    public string? Id { get; set; }

    // from EmployeeService

    public string? FullName { get; set; }

    public int? Age { get; set; }

    // from OrganizationService

    public Company? Company { get; set; }

    public IReadOnlyList<Team>? Teams { get; set; }

    // from PortfolioService

    public IReadOnlyList<Project>? Projects { get; set; }

    public IReadOnlyList<Repository>? Repositories { get; set; }
}