public static bool CustomerHasMultiplier(string ID)All I want to do is knock on the database's door and ask, "Is anybody home?" With SQL, that means setting up a connection, a command, a reader or a data adapter and a dataset, running a query to do a count(*) or at least check to see if any rows were returned. With LINQ, it's a one-statement function that returns a bool.
{
return FSP.DC().Pm_VisualCustMultipliers
.Where(m => m.Status == "Active")
.Where(m => m.RecordDeleted == false)
.Any(m => m.VisualCustomerID == ID);
}
Friday, November 28, 2008
LINQ of the Day
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment