Skip to content

Commit add5e75

Browse files
committed
Adding InstanceTrace
1 parent 3220c6d commit add5e75

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Microsoft.AspNetCore.Http;
1+
using _034_AddTransient_DeepDive.Services;
2+
using _034_AddTransient_DeepDive.Services.Interfaces;
3+
using Microsoft.AspNetCore.Http;
24
using Microsoft.AspNetCore.Mvc;
35

46
namespace _034_AddTransient_DeepDive.Controllers
@@ -7,6 +9,23 @@ namespace _034_AddTransient_DeepDive.Controllers
79
[ApiController]
810
public class BasicController : ControllerBase
911
{
12+
private readonly IBasicService _basicService;
13+
public BasicController(IBasicService basicService)
14+
{
15+
_basicService = basicService;
16+
}
1017

18+
[HttpGet("{id}")]
19+
public IActionResult Index(int id)
20+
{
21+
var basicDetails = _basicService.GetBasicDetails(id);
22+
23+
var dataFlowTrace = new
24+
{
25+
ServiceInstanceId = _basicService.GetInstanceId()
26+
};
27+
28+
return new JsonResult(new { Basic = basicDetails, InstanceTrace = dataFlowTrace });
29+
}
1130
}
1231
}

0 commit comments

Comments
 (0)