public async Task <IActionResult> Edit(int id) { if (id == 0) { return(RedirectToAction(nameof(Index))); } var apiScope = await _apiScopeService.GetApiScopeByIdAsync(id); if (apiScope == null) { return(RedirectToAction(nameof(Index))); } var apiScopeModel = CommonMappers.Mapper.Map <ApiScopeModel>(apiScope); return(View(apiScopeModel)); }
public async Task <IActionResult> GetApiScopeById(string id) { var apiScope = await _apiScopeService.GetApiScopeByIdAsync(Int16.Parse(id)); if (apiScope == null) { return(NotFound()); } return(Ok(apiScope)); }
public Task <ApiScopeDto> GetApiScopeByIdAsync(int id) { return(apiScopeService.GetApiScopeByIdAsync(id)); }