Exemplo n.º 1
0
        public CommentModule()
        {
            Get("/", args => "List of Movies");

            Get("/movie/{name}", args => {
                var liveCommentBusiness = new LiveCommentBusiness();

                liveCommentBusiness.NewComment();


                //var d = liveCommentBusiness.GetComment(new Guid("c8281bad-dc52-424b-aebd-65759a0d8cbb"));

                return("Test");
            });

            Post("/movie/{movieName}/{userName}", args =>
            {
                var comment = this.Bind <LiveComment>();

                var movieName = args.movieName;
                var userName  = args.userName;

                var liveCommentBusiness = new LiveCommentBusiness();

                //liveCommentBusiness.NewComment(comment, movieName, userName);


                var d = liveCommentBusiness.GetComment(new Guid("c8281bad-dc52-424b-aebd-65759a0d8cbb"));
                //save comment


                return(HttpStatusCode.OK);
            });
        }
Exemplo n.º 2
0
        private dynamic GetComments(dynamic args)
        {
            var d = new LiveCommentBusiness();

            var result = d.GetComment(Guid.NewGuid());

            return(result);
        }