public ActionResult <MongoFile> Get(string id)
        {
            var file = _mongoFileService.Get(id);

            if (file == null)
            {
                return(NotFound());
            }

            return(file);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Method that makes the analysis
        /// </summary>
        /// <param name="item">
        /// Item to be analyzed
        /// </param>
        private static void MakeAnalysis(QueueItem item)
        {
            var doc    = NameAnalysisService.MakeNameAnalysis(item.Text).Result;
            var result = NameAnalysisService.SearchEmployees(doc, _employeeService.GetEmployees());

            var fileData = _mongoFileService.Get(item.Id);

            fileData.AnalysisDone = 1;
            fileData.Result       = result;
            _mongoFileService.Update(item.Id, fileData);

            return;
        }
Ejemplo n.º 3
0
        public string Get(string id)
        {
            try
            {
                var fileData = _mongoFileService.Get(id);

                if (fileData == null)
                {
                    return(null);
                }

                return(fileData);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                return(null);
            }
        }