Exemplo n.º 1
0
        public string addPost(string userId, string postContent, string imagePath)
        {
            string postId = DateTimeUtils.getKeyTimeStamp();
            Post   post   = new Post()
            {
                id = postId, uid = userId, image = imagePath, time = DateTime.Now, content = postContent
            };
            bool result = postDao.insert(post);

            if (result)
            {
                return(postId);
            }
            else
            {
                return(null);
            }
        }