Skip to content

mshwf/NiceLinq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NiceLinq

The library contains two methods that I used to use whenever I thought of the IN and NOT IN operators in SQL, their implementations are simple but hides a repetive code. For example, if you want to get list of accounts fall in range of Ids, use it like this:

var selectedAccounts = listOfAccounts.In(x => x.Id, 1,2,3,4);
//this will get you a list of accounts whose Ids are 1,2,3,4

you also can pass a List<int> rather array of parameters:

List<int> ids = bank.GetAccountIds(1);
var selectedAccounts = listOfAccounts.In(x => x.Id, ids);

Releases

No releases published

Packages

No packages published

Languages