public int CreateNewHyperlink(HyperlinkDTO hyperlink)
        {
            Guard.ArgNotNull(hyperlink, "hyperlink");
            var result = new CreateHyperlinkResponse();
            int newHyperlinkId = -1;
            try
            {
                result = _dataService.CreateHyperlink(new CreateHyperlinkRequest
                                                          {
                                                              Uri = hyperlink.Uri,
                                                              Description = hyperlink.Description,
                                                              LastModified = hyperlink.LastModified,
                                                              SnippetId = hyperlink.Snippet_Id
                                                          });
            }
            catch (Exception ex)
            {
                Logger.LogError("Error creating new hyperlink", ex);
            }

            return result.HyperlinkId;
        }
        public GetHyperlinkByIdResponse GetHyperlinkById(GetHyperlinkByIdRequest request)
        {
            var response = new GetHyperlinkByIdResponse();

            try
            {
                Guard.ArgNotNull(request, "request");

                Hyperlink result = _unitOfWork.HyperLinkRepository.GetById(request.HyperlinkId);

                Guard.ArgNotNull(result, "result");

                var dto = new HyperlinkDTO
                              {
                                  Id = result.Id,
                                  Description = result.Description,
                                  LastModified = result.LastModified,
                                  Snippet_Id = result.Snippet_Id,
                                  Uri = result.Uri
                              };

                response.Success = true;
                response.Hyperlink = dto;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.FailureInformation = ex.Message;
                Logger.LogError("GetHyperlinkById Method Failed", ex);
            }

            return response;
        }
        public GetHyperlinksByUserIdResponse GetHyperlinksByUserId(GetHyperlinksByUserIdRequest request)
        {
            var response = new GetHyperlinksByUserIdResponse();

            try
            {
                Guard.ArgNotNull(request, "request");

                IEnumerable<Hyperlink> result =
                    _unitOfWork.HyperLinkRepository.Get(d => d.Snippet.User_Id == request.UserId &&
                                                             d.Snippet.User_FormsAuthId == request.UserGuid);

                foreach (Hyperlink hyperlink in result)
                {
                    var temp = new HyperlinkDTO
                                   {
                                       Id = hyperlink.Id,
                                       Description = hyperlink.Description,
                                       LastModified = hyperlink.LastModified,
                                       Snippet_Id = hyperlink.Snippet_Id,
                                       Uri = hyperlink.Uri
                                   };
                    ((IList<HyperlinkDTO>) response.Hyperlinks).Add(temp);
                }

                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.FailureInformation = ex.Message;
                Logger.LogError("GetHyperlinksByUserId Method Failed", ex);
            }

            return response;
        }