I'm trying to make a api like the OPENBANKPROJECT. Such as
/api/banks/{BANK_ID}/atms/{ATM_ID} etc. I guess banks and atm is a different controller
I want get a global (api/Claim/{id}/Detail/[action] i need this {id}) parameter before before [action] initialize (maybe in constructor).
How do i get this {id} before [action] initialize?
[Route("api/Claim/{id}/Detail/[action]")]
public class ClaimDetailController
{
int _id; // assignment {id}
public ClaimDetailController(IClaimDetailService claimDetailService)
{
`Need Query Id before execute action`
}
[HttpPost]
public async Task<BaseResponse> ClaimDetailInfoPolicy(ClaimDetailKeyModel model)
{
return `codes with _id`;
}
}
public class ClaimDetailKeyModel
{
public long FileNo { get; set; }
public long RecourseNo { get; set; }
}
[ApiController]atturibute. Do you have any solution with that atturibute?