示例#1
0
 public Video Create(Video video)
 {
     /*Video newVideo = new Video();
      * newVideo.AllowComments = video.AllowComments;
      * newVideo.AllowRaiting = video.AllowRaiting;
      * newVideo.Blocked = false;
      * newVideo.CreationDate = DateTime.Now.*/
     _context.Videos.Add(video);
     _context.SaveChanges();
     return(video);
 }
示例#2
0
 public Comment Create(Comment comment)
 {
     _context.Comments.Add(comment);
     _context.SaveChanges();
     return(comment);
 }
示例#3
0
 public LikeDislikeVideo Add(LikeDislikeVideo likeDislike)
 {
     _context.Add(likeDislike);
     _context.SaveChanges();
     return(likeDislike);
 }
示例#4
0
 public LikeDislikeComment Add(LikeDislikeComment likeDislike)
 {
     _context.Add(likeDislike);
     _context.SaveChanges();
     return(likeDislike);
 }
示例#5
0
 public User Add(User newUser)
 {
     _context.Users.Add(newUser);
     _context.SaveChanges();
     return(newUser);
 }
示例#6
0
 public Follow Add(Follow follow)
 {
     _context.Follow.Add(follow);
     _context.SaveChanges();
     return(follow);
 }