Example #1
0
        public void Post(AddPostDTO NewPostData)
        {
            var Data = Request.Headers["VideoData"];
            NewPostData.VideoData = Data;
            PostService.SaveNewPost(NewPostData);

        }
Example #2
0
 public void Post(AddPostDTO NewPost)
 {
     PostService.SaveNewPost(NewPost);
 }
Example #3
0
        public static string SaveNewPost(AddPostDTO PostDTO)
        {
            Post NewPost = new Post();
            //// save New Video block .......

            NewPost.VideoID = SaveNewVideo(false, PostDTO.UserID).VideoID;
            using (var context=new PostContext())
            {
                
                /// save new Post block ..............
                NewPost.PostID = CreateNewID();
                 NewPost.IsActive = true;
                NewPost.Description = PostDTO.Description;
                NewPost.CountryID = PostDTO.CountryID;
                NewPost.RoundID = PostDTO.RoundID;
                NewPost.Titel = PostDTO.Titel;
                NewPost.Place = PostDTO.Place; 
                context.Posts.Add(NewPost);

                // save changes to the DB ...........
                context.SaveChanges();
            }
            return "";
        }