int[] ids = new int[]{1,2,3,45,99};
using (DatabaseEntities db = new DatabaseEntities ())
{
return db.Licenses.Where(
i => i.license == mylicense
&& ids.Contains(i.number)
).ToList();
}
should work
More Related Contents:
- How to Create a real one-to-one relationship in SQL Server
- Where is |DataDirectory| defined?
- Entity Framework VS LINQ to SQL VS ADO.NET with stored procedures? [closed]
- Solution for: Store update, insert, or delete statement affected an unexpected number of rows (0) [closed]
- How do I use structural annotations to set SQL type to Date in model first approach
- SQL to Entity Framework Count Group-By
- Is it possible to run native sql with entity framework?
- The object ‘DF__*’ is dependent on column ‘*’ – Changing int to double
- Entity Framework Skip/Take is very slow when number to skip is big
- Current date in Oracle Db
- How do I UPDATE from a SELECT in SQL Server?
- Optimize GROUP BY query to retrieve latest row per user
- INNER JOIN vs LEFT JOIN performance in SQL Server
- Equals(=) vs. LIKE
- Function vs. Stored Procedure in SQL Server
- Check if value exists in Postgres array
- How to check if a stored procedure exists before creating it
- Reference alias in WHERE clause
- update one table with data from another
- Generate a range of dates using SQL
- Generate Delete Statement From Foreign Key Relationships in SQL 2008?
- SQL primary key: integer vs varchar
- Why does SQL Server round off results of dividing two integers?
- Is it necessary to create tables each time you connect the derby database?
- SQL Server: should I use information_schema tables over sys tables?
- SQL Server Cumulative Sum by Group
- How to handle optional parameters in SQL query?
- How to create a Date in SQL Server given the Day, Month and Year as Integers
- Count records for every month in a year
- Postgres: convert single row to multiple rows (unpivot)