NetSuite Data Provider - Online Help
NetSuite Data Provider
Questions / Feedback?

LINQ Queries

Below are examples of LINQ queries supported by the provider.

Retrieve and Search for Records

The following query searches for records that have a value of "Checking" for the acctName column.

var query = from Account in context.Account
            where Account.acctName == "Checking"
            select Account;

Contains

You can also search for strings within strings: The following example retrieves all Account entities with a value that contains "B" in the acctName column.

var query = from Account in context.Account
            where Account.acctName.Contains("B")
            select Account;

Limit

The following example limits the results returned to 10.

var query = (from Account in context.Account
            orderby Account.acctName descending,
            Account.AcctName ascending
            select Account).Take(10);

Count

The following example counts all entities that match a given criterion.

var query = (from Account in context.Account
             where Account.acctName == "Checking"
             select Account).Count();

 
 
Copyright (c) 2015 RSSBus, Inc. - All rights reserved.
Build 1.0.5578.0