示例#1
0
        public ConceptRepository(Context.ConceptsContext context, IOptions <DatabaseConfig> config, IOptions <LanguageConfig> language)
        {
            _context        = context;
            _databaseConfig = config.Value;
            _languageConfig = language.Value;
            _sqlResultToListOfConceptsFunc = reader =>
            {
                var concepts = new List <Concept>();
                if (reader == null)
                {
                    return(concepts);
                }
                while (reader.Read())
                {
                    concepts.Add(Concept.DataReaderToConcept(reader));
                }

                return(concepts);
            };
        }