public bool DeletePost(int postId)
{
try
{
var db = _postRepository.Find(p => p.PostId == postId, true).FirstOrDefault();
if (db == null) return false;
_postRepository.Delete(db);
return true;
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
}