Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.
0
votes
6answers
43 views
Linq query for selecting an item from tree structure, but to look in the whole depth
Here's a class I made:
public class ItemTree
{
public Int32 id { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public String text { get; set; }
...
0
votes
0answers
15 views
LINQ group by date - include empty days WITHOUT using join
Using C#, NHibernate, NHibernate to LINQ. Using NHibernate to LINQ, I do not have the JOIN functionality. I can not use QueryOver either.
I have a LINQ query that counts the amount of Leads and ...
0
votes
4answers
56 views
Take all elements of .Split (' ') and take last OR exclude last item
I have an inconsistend address field which I am reading from excel. I need to split this field and enter those 2 values into two list properties.
the content could be something like this
At the ...
2
votes
2answers
45 views
Query for selecting and anonymous object with where clause
This is my code:
var tree = new
{
id = "0",
item = new List<object>()
};
foreach ()
{
tree.item.Add(new
{
id = my_id,
text = my_name,
parent = my_par
...
0
votes
1answer
32 views
Insert new row in gridview by specific value
I'm using Devexpress tool anyone please help me?
I'm using Devexpress tool to develop my website. But i have some problems so i hope anyone could help me. I really need it in my project. Please see ...
2
votes
3answers
52 views
How to page an array using LINQ?
If I have an array like this :
string[] mobile_numbers = plst.Where(r => !string.IsNullOrEmpty(r.Mobile))
.Select(r => r.Mobile.ToString())
...
2
votes
1answer
34 views
Referencing Non-Scalar Closures c#
Hello everybody and thanks for taking some time to read my post.
I'm new to c# and especially to linq.
Here's my problem:
Player Hero = new Player();
Hero.ImageURL = ...
2
votes
0answers
33 views
OUTER APPLY in .net 4.5 and Entity Framework
After installing the .Net 4.5, there were problems in queries generated by EF. The same query in linq to .Net 4.0 works correctly. I'm using Firebird database and it does not support command OUTER ...
1
vote
1answer
31 views
Custom Extension Method in LINQ to Objects to return anonymous objects with comparer
I read that when projecting a new anonymous object from a LINQ to Objects query, the projected object will override its Equals and GetHashCode methods so that executing any further methods that check ...
0
votes
0answers
13 views
Linq: Group Joining two tables with same column names
I've the following Linq order:
From s In ds.tblSale Group Join p In ds.tblPurchase On s.Day Equals p.Day Into sp = Group From spDefault In sp.DefaultIfEmpty
Group ...
-2
votes
0answers
22 views
LINQ nested JOIN
I would really appreciate some help with this Linq query.
I have the following tables {Columns}:
1) UserProfile {UserId, UserName} = All the registered users to the site
2) CategorySelections ...
3
votes
3answers
57 views
How to select the same list but with an additional variable set?
I have a List<MyObject>
MyObject is as follows.
public class MyObject
{
public bool available;
public bool online;
}
Now when I retrieve this List<MyObject> from another ...
1
vote
4answers
74 views
SQL LIKE in Linq
Before adding this question, I did search on stackoverflow for similar ones but I couldnt find. Most of the questions over internet were using LIKE with a string (for eg LIKE '%ABC%') but I need to ...
0
votes
4answers
58 views
Trim version using LINQ
i need to fetch the first two octets of an version.
For example "4.12.4.5" to "4.12".
How do I do that using LINQ?
Currently, i am using the following piece of code, but it is not completely LINQ.
...
1
vote
0answers
25 views
need equivalent query in SQLite [duplicate]
what is the equivalent sqlite query of the following statement?
Data = _db.EMP_TRACKING.OrderBy(m => m.ID).Skip(page - 1).Take(PageSize)
Or
What will be the query for the following scenario??
...