public async Task <IActionResult> ApiScope(int?id) { if (id == null) { var apiScopeDto = new ApiScopeDto(); return(View(apiScopeDto)); } else { var apiScopeDto = await _apiScopeService.GetApiScopeAsync(id.Value); return(View(apiScopeDto)); } }
public async Task <ActionResult <ApiScopeApiDto> > GetScope(int id) { var apiScopesDto = await _apiScopeService.GetApiScopeAsync(id); var apiScopeApiDto = apiScopesDto.ToApiScopeApiModel <ApiScopeApiDto>(); return(Ok(apiScopeApiDto)); }
public async Task <IActionResult> ApiScope(string id) { if (id.IsNotPresentedValidNumber()) { return(NotFound()); } if (id == default) { var apiScopeDto = new ApiScopeDto(); return(View(apiScopeDto)); } else { int.TryParse(id, out var apiScopeId); var apiScopeDto = await _apiScopeService.GetApiScopeAsync(apiScopeId); return(View(apiScopeDto)); } }