Closed frankcollins3 closed 11 months ago
initialize to a value: [Required] public string pokename { get; set; } = string.Empty;
allow null this way (I thought removing the data attribute would permit null but the question mark is needed. public string? type { get; set; }
[8:18am]
attempting to do: run the app to check swagger and API endpoints.
error: warning CS8618: Non-nullable property 'pokename' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
here's the model with the error:
proposed approach: minimum viability: remove the data Annotation as it says above. "Consider declaring the property as nullable"
possible improvements: