Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created January 5, 2022 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/03677119a630df0abbbb8833d7ef44b1 to your computer and use it in GitHub Desktop.
Save dcomartin/03677119a630df0abbbb8833d7ef44b1 to your computer and use it in GitHub Desktop.
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