Skip to content Skip to sidebar Skip to footer
Showing posts with the label Linq

Sql Server Where Clause Equals Instead Of In

Here is the generated T-SQL from LINQ SELECT [Extent1].[ID] AS [ID], [Extent1].[Name] AS … Read more Sql Server Where Clause Equals Instead Of In

Adding Additional Query To Return(view)

I have a ViewModel and I currently return a query where if the movie has employees and they have a … Read more Adding Additional Query To Return(view)

How Do I Build A Search Mechanism For My Application?

It seems to be a common requirement nowadays to have a search feature that can search almost anythi… Read more How Do I Build A Search Mechanism For My Application?

Efficient Query For Only The First N Rows For Each Unique Id

This is a follow-up to this question. TLDR: The question: I want to filter a query to only keep th… Read more Efficient Query For Only The First N Rows For Each Unique Id

Linq Group Join And Where Statement On Property Of The Joined Table

So I believe I have found out that group join is a left outer join and that is what I need. But I n… Read more Linq Group Join And Where Statement On Property Of The Joined Table

Sql Or Linq: How Do I Select Records Where Only One Paramater Changes?

Say we have this list: Id IdRef myColumn anotherColumn 448 70 1 228 449 … Read more Sql Or Linq: How Do I Select Records Where Only One Paramater Changes?

.net Framework Datatable.select(string) Method When The Filter Expression Contains ' Or "

In a .Net web application I use the public DataRow[] Select(string filterExpression) method in man… Read more .net Framework Datatable.select(string) Method When The Filter Expression Contains ' Or "

Entity Sqlce Can't Find Connection String In App.config File

I've been getting this error when I try and use my model container: No connection string named… Read more Entity Sqlce Can't Find Connection String In App.config File

Linq How To Return Last Date And Difference Between First And Last Count

I have a table with the following column and sample data: acteename updated_at count… Read more Linq How To Return Last Date And Difference Between First And Last Count

Linq To Sql / Filter Duplicates

i have a view in my sql server 2012 with a couple of duplicates and i want to sort them by the newe… Read more Linq To Sql / Filter Duplicates

Linq To Sql - Having And Group By

I've this query below working fine. However I want to implement it using Linq. select u.ID, u.N… Read more Linq To Sql - Having And Group By

Linq: Adding Where Clause Only When A Value Is Not Null

I know a typical way is like this: IQueryable query = from staff in dataContext.Staffs; if(name1 !=… Read more Linq: Adding Where Clause Only When A Value Is Not Null

Check One Date Is Falling Between Date Range-linq Query

i am storing Leave Information of an employee in database.From and To Date will be stored in DB.I w… Read more Check One Date Is Falling Between Date Range-linq Query

Comparing 2 Linq Applications: Unexpected Result

I drafted 2 ASP.NET applications using LINQ. One connects to MS SQL Server, another to some proprie… Read more Comparing 2 Linq Applications: Unexpected Result

Distance Calculation With Huge Sql Server Database

I have a huge database of businesses (about 500,000) with zipcode, address etc . I need to display … Read more Distance Calculation With Huge Sql Server Database

Linq To Sql - Getting The Last Know History Entry For Each Divice, Prior To A Certain Date

I have a question similar to this entry: how-do-i-query-sql-for-a-latest-record-date-for-each-user … Read more Linq To Sql - Getting The Last Know History Entry For Each Divice, Prior To A Certain Date

(ef 4.0 Vs A Normal Sql) Improve Execution Time In Linq

When I execute this SQL statement, it takes absolutely no time to run: select * from [user] left jo… Read more (ef 4.0 Vs A Normal Sql) Improve Execution Time In Linq

Linq2sql And Sql Server 2000

Good day! I have used LINQ2SQL with SQL Server 2005, but now I need to use it with SQL Server 2000.… Read more Linq2sql And Sql Server 2000

'invalid Column Name [columnname]' On A Nested Linq Query

Last update After alot of testing, I realised that if i ran the same query over the same dataset (i… Read more 'invalid Column Name [columnname]' On A Nested Linq Query

C# Visual Studio: How Do I Update A Db From Edit With Datagridview Using Linq?

I have a form WinForms form window with a DataGridView. It pulls data from a SQL Server Express dat… Read more C# Visual Studio: How Do I Update A Db From Edit With Datagridview Using Linq?