Example #1
0
        private static void PoccessTexts(string identity, OriginalTextRepository originalTextRepository, Entities entities)
        {
            var testsToGenerate = originalTextRepository.GetAll(t => t.ProcessedText == null).Take(10).ToList();
            testsToGenerate
                .ForEach(
                    t =>
                    {
                        t.ProcessedText = "test - " + identity;
                        t.ProcessedDate = DateTime.Now;
                    }
                );

            entities.SaveChanges();
        }
Example #2
0
        private void PoccessTextsPart(OriginalTextRepository originalTextRepository, Entities entities)
        {
            var testsToGenerate = originalTextRepository
                .GetAll(t => t.ProcessedText == null)
                .Take(Config.PollingPartSize)
                .ToList();

            testsToGenerate
                .ForEach(
                    t =>
                    {
                        t.ProcessedText = GenerateMarkovChain(t.Text);
                        t.ProcessedDate = DateTime.Now;
                    }
                );

            entities.SaveChanges();
        }