public JsonResult Get(int id) { Func <Blog, bool> func = blog => !blog.IsDeleted && blog.State == (int)BlogStates.Publish && blog.ClassifyId == id; var result = _blogService.Get(func).AsParallel(); return(Json(result)); }
public IActionResult UnPublish() { Func <Blog, bool> func = state => state.State == (int)BlogStates.Unpublish && !state.IsDeleted; var result = _blogService.Get(func) .Select(m => BlogViewModel .Convert(m.Id, m.Title, m.CreationTime, m.ModificationTime)); return(View(result)); }