Last active
December 27, 2022 16:26
-
-
Save crjcodes/395f6beca6c14efa35b847f2ce4ca409 to your computer and use it in GitHub Desktop.
LabDemo.MinimalApi - App Configuration - Adding domain model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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