WebApi - IHttpActionResult return methods List


 // Example: Return IHttpActionResult Type using Ok() and NotFound() Methods Copy

public IHttpActionResult Get(int id)
{
    Student stud = GetStudentFromDB(id);
            
    if (stud == null)
    {
        return NotFound();
    }

    return Ok(stud);
}

Yorumlar