Skip to content

Instantly share code, notes, and snippets.

@crjcodes
Last active December 27, 2022 16:26
Show Gist options
  • Save crjcodes/395f6beca6c14efa35b847f2ce4ca409 to your computer and use it in GitHub Desktop.
Save crjcodes/395f6beca6c14efa35b847f2ce4ca409 to your computer and use it in GitHub Desktop.
LabDemo.MinimalApi - App Configuration - Adding domain model
public class FlattenedLabRecord
{
public string Name { get; set; } = string.Empty;
public DateTime DateMeasured { get; set; } = DateTime.MinValue;
public float Value { get; set; } = 0;
public string Units { get; set; } = string.Empty;
}
var records = builder.Configuration.GetSection("LabRecords").Get<List<FlattenedLabRecord>>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment