예제 #1
0
        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;
            }
        }
예제 #2
0
 public void UpdateBlog(int BlogId, Blog blog)
 {
     _blogDao.UpdateBlog(BlogId, blog);
 }