Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.

learn more… | top users | synonyms

0
votes
0answers
26 views

Linq Query for Tags/Fields

I am new to Linq and I have difficulties querying the database for a result containing multiple tag IDs. So, I have two models: Folders and FieldTags. The Folder holds a string with all FieldTag IDs ...
0
votes
2answers
27 views

Select distinct values from a list using LINQ

i want select distinct firstName's column from Database with linq my class is: public partial class user { public string firstName{ get; set; } public string lastName{ get; set; } ...
0
votes
0answers
10 views

Paging in repeater with linq

I want to do paging in repeater control in asp.net. I can do custom paging with repeater with ado.net. But with linq i never did it. I try it but its not work Here is the code for binding my repeater ...
0
votes
0answers
22 views

LINQ: how to deattach entity?

In LINQ we can attach class to DataContext. Is there anyway to break or de-attach the relationship beween the Context and entity? Actually I am using a common object of datacontext class on a ...
0
votes
1answer
32 views

Connecting to DB Context with C#

I have a API setup doing all of calls to the database, but there is one occasion in a website that cannot make a call api call for some reason. And only thing I can think of is just doing a quick call ...
2
votes
1answer
27 views

Load related entities from a Collection in Entity Framework

How do I load related entities from an already loaded Collection: The Collection: public class Ad { // Primary properties [Key] public int Id { get; set; } private ...
0
votes
0answers
5 views

Use DataContext to return dynamic data for jqGrid

I'm trying to create a way to output dynamic results in JsonResult format so that it will work with jqGrid. In my case, I have a simple sql statement in a string: string columns = "userid, username, ...
3
votes
0answers
23 views

Loading class with lambda expressions in Compact Framework 3.5 is slow on first load

While optimizing one of the larger forms in a compact framework 3.5 applications we noticed a significant performance hit while loading forms that contain lambda expressions. This is only noticeable ...
1
vote
2answers
67 views

Check if following items exist in the List<T>

I have a list of strings and I need to check if specific items(not one item) exist in that list. List<string> strings = new List<string>() {"one","two","three","four","five" }; I need ...
0
votes
0answers
28 views

Linq statement to select rows from db and display as list in MVC view

I need to select all rows from a table with a status as closed, and then I need to display results in a list in a asp.net mvc view. What should I place in the cshtml first line? @model ...
0
votes
2answers
29 views

Enumeration yielded no result?

I am trying to filter some objects using linq to enitites and I get an error telling me "Enumeration yielded no results". on the client side I get a message like this: The operation cannot be ...
0
votes
4answers
45 views

Linq Query with a special case for 0 values

I have a Linq query as below. var DataSource = from m in product select new { Class = m.Class, Id = (new Make(m.Id)).ProductName}; I instantiate a class called Make and fetch the ...
0
votes
1answer
29 views

LINQ Composite Key GroupJoin with keys unknown at compile time

I'm trying to get a GroupJoin to work with multiple unknown keys using LINQ. I've seen solutions with anonymous types, but the keys were always pre-defined. In my case, they're user-defined, so I ...
2
votes
1answer
55 views

LINQ query is too slow, Equivalent SQL is fine

I am trying to query for daily active users in a database using C# and LINQ. I have a SQL query that works fine. It finishes running in < 4 seconds. My table is called Logins, with properties: ...
0
votes
0answers
14 views

Two tables succesfully associated and models auto created (vis studio) how to, use the two tables as one in a controller?

Im new to MVC and entity framework, ive just created a ADO entity in visual studio, created assoications and done the table mappings for my two tables tblUsers and tblItems i right clicked and added ...

1 2 3 4 5 2053
15 30 50 per page