Esempio n. 1
0
        public List <MVwPeopleKeyWord> GetPersonalCollectionByKW(int IdKW)
        {
            List <VwPeopleKeyWord>    data    = null;
            NostradamusContextFactory factory = new NostradamusContextFactory();

            using (var context = factory.CreateDbContext(new string[] { _connection }))
            {
                data = context.VwPeopleKeyWords.Where(x => x.Idkw == IdKW).ToList();
            }

            return(ModelsTransformer.TransferModelList <VwPeopleKeyWord, MVwPeopleKeyWord>(data));
        }
Esempio n. 2
0
        public List <MPersonBase> GetPersonalCollectionByLastName(string LastName)
        {
            List <Person>             data    = new List <Person>();
            NostradamusContextFactory factory = new NostradamusContextFactory();

            using (var context = factory.CreateDbContext(new string[] { _connection }))
            {
                var tem = context.People;
                data.AddRange(context.People);
                data = data.Where(x => x.SecondName.Contains(LastName)).ToList();
            }

            return(ModelsTransformer.TransferModelList <Person, MPersonBase>(data));
        }
Esempio n. 3
0
        public List <MKeyword> GetKeywordsCollection(int refId)
        {
            List <Keyword>            data    = new List <Keyword>();
            NostradamusContextFactory factory = new NostradamusContextFactory();

            using (var context = factory.CreateDbContext(new string[] { _connection }))
            {
                var tem = context.Keywords;
                data.AddRange(context.Keywords);
                data = data.Where(x => x.ReferenceId == refId && x.Idkw != 0 && x.Idkw != 400).ToList();
            }

            return(ModelsTransformer.TransferModelList <Keyword, MKeyword>(data));
        }