public bool UpdateBlog(string id, string rating) { int rightId; int rightReting; if (Int32.TryParse(id, out rightId) && Int32.TryParse(rating, out rightReting)) { if (GetBlogById(rightId) != null) { _blogDao.UpdateBlog(rightId, rightReting); return true; } else { Console.WriteLine("Can't find blog"); return false; } } else { return false; } }
public void UpdateBlog(int BlogId, Blog blog) { _blogDao.UpdateBlog(BlogId, blog); }