Skip to content

Commit 3b0e486

Browse files
committed
Adding ServiceInstanceId
1 parent add5e75 commit 3b0e486

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

034_AddTransient_DeepDive/Controllers/BasicController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public IActionResult Index(int id)
2222

2323
var dataFlowTrace = new
2424
{
25+
// For Transient, this will be keep on changing
2526
ServiceInstanceId = _basicService.GetInstanceId()
2627
};
2728

034_AddTransient_DeepDive/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public static void Main(string[] args)
1414

1515
// Add services to the container.
1616

17+
builder.Services.AddTransient<IBasicService, BasicService>();
18+
1719
builder.Services.AddTransient<IUserService, UserService>();
1820
builder.Services.AddTransient<IUserRepository, UserRepository>();
1921

0 commit comments

Comments
 (0)