public Message <IEnumerable <DocumentsModel> > GetUserPrivateDocuments(int UserId) { try { var documents = _documentsRepository.GetPrivateDocuments(UserId); var documentsModel = _mapper.Map <IEnumerable <DocumentsModel> > (documents); return(new Message <IEnumerable <DocumentsModel> >() { IsSuccess = true, ReturnMessage = "OK", StatusCode = 200, Data = documentsModel }); } catch (Exception ex) { _logger.LogError("Error", ex); return(new Message <IEnumerable <DocumentsModel> >() { StatusCode = 404, IsSuccess = false, ReturnMessage = "Error", Data = null }); } }