Skip to content

Commit 5bc7a1d

Browse files
Adjust sample code to match fixed tutorial
1 parent 12a9684 commit 5bc7a1d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

csharp/getting-started/console-webapiclient/Repository.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
public record class Repository(
1+
using System.Text.Json.Serialization;
2+
3+
public record class Repository(
24
string Name,
35
string Description,
4-
Uri GitHubHomeUrl,
6+
[property: JsonPropertyName("html_url")] Uri GitHubHomeUrl,
57
Uri Homepage,
68
int Watchers,
7-
DateTime LastPushUtc
9+
[property: JsonPropertyName("pushed_at")] DateTime LastPushUtc
810
)
911
{
1012
public DateTime LastPush => LastPushUtc.ToLocalTime();

0 commit comments

Comments
 (0)