public async Task <IActionResult> Get([FromQuery] Guid?Id, [FromQuery] string?Name) { if (Id != null) { var result = await _speciesRepository.GetById((Guid)Id); return(Ok(new { status = "success", data = result })); } if (Name != null) { var result = await _speciesRepository.GetByName(Name); return(Ok(new { status = "success", data = result })); } return(Ok(new { status = "error", data = "Not Found" })); }