public IActionResult GetByNaam([FromQuery] string naam) { Post post = postContext.GetByNaam(naam); if (post == null) { return(NotFound()); } return(new ObjectResult(post)); }
public Post GetByNaam(string naam) { return(context.GetByNaam(naam)); }