how to query against an array

asp.net-core-mvc entity-framework-core

Accepted Answer

var ids =  decklist.Split( ',' )
    .Select( id => Convert.ToInt32( id ) )
    .ToArray();

var cards = _context.Cards.Where( c => ids.Contains( c.ID ) );
1
2/5/2017 12:59:43 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow