Beispiel #1
0
        public void AddComment(string text, int picId, string currentUserId)
        {
            var shoeComment = new Comment
            {
                Text              = text,
                ShoePicId         = picId,
                ApplicationUserId = currentUserId,
                CreateDate        = DateTime.Now
            };

            _context.Comments.Add(shoeComment);
            _context.SaveChanges();
        }
Beispiel #2
0
        public void AddPictureToDatabase(ShoePic pic)
        {
            _context.ShoePics.Add(pic);

            _context.SaveChanges();
        }
Beispiel #3
0
        public void AddPointToUser(ApplicationUser User)
        {
            User.Points += 10;

            _context.SaveChanges();
        }