public IActionResult Search([FromForm] string key) { var listBlog = _blogService.SearchBlogWithKey(key); if (listBlog != null) { return(Json(new { status = 200, listBlog, message = "Complete" })); } return(Json(new { status = 404, listBlog = "", message = "Complete" })); }
public List <BlogDTO> SearchBlogWithKey(string key) { return(_blogservice.SearchBlogWithKey(key)); }