Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created Jan 5, 2022
Embed
What would you like to do?
public class ReadModelFacade : IReadModelFacade
{
public IEnumerable<InventoryItemListDto> GetInventoryItems()
{
return FakeDatabase.list;
}
public InventoryItemDetailsDto GetInventoryItemDetails(Guid id)
{
return FakeDatabase.details[id];
}
}
public class Details : PageModel
{
public InventoryItemDetailsDto InventoryItem { get; set; }
public void OnGet(string id)
{
InventoryItem = new ReadModelFacade().GetInventoryItemDetails(Guid.Parse(id));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment