public async Task <ActionResult <RankResource> > GetRateItem(int id) { //check employee !null Or null var rateItem = await _rankService.GetByIdAsync(id); if (rateItem == null) { return(NotFound()); } //if employee !null then data to add Employee View Table using AutoMapper var resources = _mapper.Map <Rank, RankResource>(rateItem); return(Ok(resources)); }