Пример #1
0
        public List <Own> GetByIsbn(string isbn)
        {
            using (SlisEntities context = DbContextCreator.Create())
            {
                var query = from x in context.Owns
                            where x.Isbn.Contains(isbn)
                            select x;

                return(query.ToList());
            }
        }
Пример #2
0
        public List <Own> GetByLibraryId(int libraryId)
        {
            using (SlisEntities context = DbContextCreator.Create())
            {
                var query = from x in context.Owns
                            where x.LibraryId == libraryId
                            select x;

                return(query.ToList());
            }
        }
Пример #3
0
        /*public List<Population> GetByIsMale(bool isMale)
         * {
         *  using (SlisEntities context = DbContextCreator.Create())
         *  {
         *      var query = from x in context.Populations
         *                  where x.IsMale == true
         *                  select x;
         *
         *      return query.Count();
         *  }
         * }
         */
        public List <Population> GetByAgeCode(int ageCode)
        {
            using (SlisEntities context = DbContextCreator.Create())
            {
                var query = from x in context.Populations
                            where x.AgeCode == ageCode
                            select x;

                return(query.ToList());
            }
        }