File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
034_AddTransient_DeepDive/Controllers Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1- using Microsoft . AspNetCore . Http ;
1+ using _034_AddTransient_DeepDive . Services ;
2+ using _034_AddTransient_DeepDive . Services . Interfaces ;
3+ using Microsoft . AspNetCore . Http ;
24using Microsoft . AspNetCore . Mvc ;
35
46namespace _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}
You can’t perform that action at this time.
0 commit comments