result:
// - CountNumberOfRowAccounts: 31
// - Columns:
// - Name: Account
// - Number: New Account
// - Payment Type: Monthly
// - Activation Code: AC01
// - Serial Number: S0003423
// - Manufacturer: “Zyme”
IQueryable test1 = db.tallyerp9serialandactivationkeyresults;
IQueryable test2 = db.tallyerp9serialandactivationkeyresults;
// Run Example #1: Return an array of tallyerp9serialandactivationkeyresult objects and count the number of rows returned
var tallyerp9serialandactivationkeyresultList = test1.ToList();
Console.WriteLine("CountNumberOfRowAccounts: {0}", tallyerp9serialandactivationkeyresultList.Count());
// Run Example #2: Return an array of tallyerp9serialandactivationkeyresult objects and access specific columns
tallyerp9serialandactivationkeyresultList = test2.Where(x => x.Account == "SHCA" && x.Number == "SHCA0032");
// Run Example #3: Return an array of tallyerp9serialandactivationkeyresult objects and access a subset of columns
tallyerp9serialandactivationkeyresultList = test2.Where(x => x.Account == "SHCA" && x.Number == "SHCA0032").Select(x => x.Name).ToList();
Console.WriteLine("CountNumberOfRowAccounts: {0}", tallyerp9serialandactivationkeyresultList
Related links:
Comments