Skip to content

Commit 2cb02c8

Browse files
fix: enable nullable reference types in Api project
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 142d84e commit 2cb02c8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

apps/api/Api/Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net10.0</TargetFramework>
5+
<Nullable>enable</Nullable>
56
</PropertyGroup>
67

78
<ItemGroup>

apps/api/Api/Controllers/WeatherForecastController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public string Id
6363
{
6464
get { return Guid.NewGuid().ToString(); }
6565
}
66-
public string DateFormatted { get; set; }
66+
public string DateFormatted { get; set; } = string.Empty;
6767
public int TemperatureC { get; set; }
68-
public string Summary { get; set; }
68+
public string Summary { get; set; } = string.Empty;
6969

7070
public int TemperatureF
7171
{

0 commit comments

Comments
 (0)