Exemplo n.º 1
0
        public void SaveLastCommented(Guid id)
        {
            LastPhoto lp = new LastPhoto(id);

            _context.LastPhoto.Add(lp);
            _context.SaveChanges();
        }
Exemplo n.º 2
0
        public LastPhoto GetLastCommentedPhoto()
        {
            LastPhoto lp = _context.LastPhoto.FirstOrDefault();

            if (lp != null)
            {
                _context.LastPhoto.Remove(lp);
                _context.SaveChanges();
            }
            return(lp);
        }