-
as seen on C# Corner
- Search for 'C# Corner'
This article demonstrates how to use LINQ on DataTable, XML Data using LINQ to XML and SQL server data base using LINQ to SQL Classes.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am running a query using Linq2SQL that comes down to following query:
DateTime? expiration = GetExpirationDate();
IQueryable<Persons> persons = GetPersons();
IQueryable<Items> subquery = from i in db.Items
where i.ExpirationDate >= expiration
…
>>> More
-
as seen on ASP.net Weblogs
- Search for 'ASP.net Weblogs'
The way data can be retrieved in .NET. LINQ provides a uniform way to retrieve data from any object that implements the IEnumerable<T> interface. With LINQ, arrays, collections, relational data, and XML are all potential data sources. Why LINQ?With LINQ, you can use the same syntax to retrieve…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a Logic layer that references Silverlight's System.Xml.Linq dll and a GUI that is in WPF (hence using the non-Silverlight System.Xml.Linq dll). When I attempt to pass an XElement from GUI project to a method in the Logic project, I am getting (basically) "XElement is not of type XElement" errors…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, I am using SQL Server 2005 in a project. I have to decide about datalayer. I would like to use LINQ in my project. I saw SubSonic 3 supporting LINQ and I also have option for LINQ to SQL, because i can have typed lists from LINQ to SQL.
I am wondering what is different between LINQ to SQL and…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This feels like a completely basic question, but, for the life of me, I can't seem to work out an elegant solution.
Basically, I am doing a Linq Query creating a new object from the query. In the new object, I want to generate a auto-incremented number to allow me to keep a selection order for…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
My career started as a hard-core functional-paradigm developer (LISP), and now I'm a hard-care .net/C# developer. Of course I'm enamored with LINQ. However, I also believe in (1) using the right tool for the job and (2) preserving the KISS principle: of the 60+ engineers I work with, perhaps only…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
I have pretty simple case which I started solving using foreach(), but then I thought I could do It using Linq
Basically I have IList that contains PaymentTransaction objects and there are 2 properties Dealer and Amount
I want to GroupBy() by Dealer and Sum() bv amount.
I tried to accomplish…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hey,
I'm building a software for timereporting
I have a Dictionary<string, Dictionary<string, double>>. The key in the main dictionary is a users name and their value is a dictionary of .
I have a function GetDepartment(string UserName) which returns a string with the users department…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In answering this question, it got me thinking...
I often use this pattern:
collectionofsomestuff //here it's LinqToEntities
.Select(something=>new{something.Name,something.SomeGuid})
.ToArray() //From here on it's LinqToObjects
.Select(s=>new SelectListItem()
{
…
>>> More