Пример #1
0
        public int CreatePhotoComment(PhotoComment item)
        {
            _unitOfWork.PhotoComments.Add(item);
            _unitOfWork.Save();

            var photoComment = _unitOfWork.PhotoComments
                .Find(c => c.CreationDate == item.CreationDate && c.AuthorId == item.AuthorId)
                .First();
            return photoComment.Id;
        }
Пример #2
0
 public void UpdatePhotoComment(PhotoComment item)
 {
     _unitOfWork.PhotoComments.Update(item);
     _unitOfWork.Save();
 }