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()); } }
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()); } }
/*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()); } }