public IActionResult GetClaims() { try { var item = from Claims in _IClaimsRepository.BindClims() join Memebers in _IMembersRepository.BindMembers() on Claims.MemberID equals Memebers.MemberID select new { Claims.MemberID, Memebers.FirstName, Memebers.LastName, Claims.ClaimDate, Claims.claimammount }; if (item != null) { return(Ok(item)); } else if (item == null) { return(NotFound(item)); } } catch (Exception ex) { return(StatusCode(500)); } return(NotFound("Not found")); }