public async Task <IActionResult> ProjectType(int?Id = null) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { var ProjectTypes = await _projectProvider.ProjectTypes(CurrentUser.Id, Id); return(Ok(ProjectTypes)); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }