public int CreatePhoto(Photo item) { _unitOfWork.Photo.Add(item); _unitOfWork.Save(); var photo = _unitOfWork.Photo .Find(p => p.CreationDate == item.CreationDate && p.AuthorId == item.AuthorId) .First(); return photo.Id; }
public void UpdatePhoto(Photo item) { _unitOfWork.Photo.Update(item); _unitOfWork.Save(); }