public IActionResult GetBySamName([FromQuery] string dn, [FromQuery] string samName) { if (!string.IsNullOrWhiteSpace(dn) && !string.IsNullOrWhiteSpace(samName)) { var computer = _computerService.FindBySamName(dn, samName); if (computer == null) { return(NotFound()); } return(Ok(computer)); } else { return(BadRequest()); } }