In the code I find the maximum date from a table by using
DateTime maxDate = Result.Select(md => md.Date).Max();
However I want to find the next largest date.
In SQL it will be
SELECT MA...
How would I replicate the following in Linq, a select in statement:
SELECT * FROM Products WHERE Products.ProductID IN(5,7,8,12)
Anyone?
Hi all,
Does anybody know how to return a distinct list from a LINQ query? I have a generic list called recipientCandidates and I need to select all items out of this list where the roleTyp...
Ok.. I've tried all the examples on MSDN and other sites but nothing seems to work.
I want to query a data table and find out how MANY rows match the selection criteria. using LINQ to data...
Hi friends,
How can I implement an OUTER JOIN in LIND to Entities?...
Thanks
I would like to know how to convert this SQL Query into a LinQ equivalent:
SELECT nContractDeliverables.* FROM (nContractDeliverables INNER(Join) nContractPaymentLines ON (nContractDeliver...
Hi Experts.
Need a piece of advice here please.
What's the best way to return the Anonymous type List ?
Lets say I have this list:
var usersList = (from u in usersTable.G...
I want to use the entity framework to call a stored procedure. I created a function import using the designer in visual studio. VmwEwonInterfaceEntities is the name of my model and SpCalacula...
Hi im new to using Visual Studio and Silverlight im following a tutorial at the Micrsoft Learn Silverlight page ("http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-3-using-network...
Hi Experts.
I have a feeling there must be a way for LINQ to automatically return the primary identity field value upon the insert.
I'm executing something simple like this:
PhoneTypes....
Hi,
My Business layer class returns a datatable to my Winform. The datatable has fields CityId, CityName, StateId, StateName, CountryId and CountryName.
Now I want to write LINQ on this ...
Hi experts,
I have a problem working with getting the return data from an anonymous collections. Thing goes crazy when it works the same way with Northwnd db, but failed for my own db.
I ...
In .NET 3.5 (C#), I need to update an object in a List<T>. I get the object out of the List<T> by querying it. I want to simply overwrite the queried object with the parameter object (of the...
I have a windows form application that uses LINQ to play with my SQL db. The problem I am having is I cannot seem to retrieve the SCOPE_IDENTITY(ID of last inserted row) from my stored procedu...
I have an interesting occurence here... I have fairly basic code (using LINQ for entities with the MS entity framework beta from December) which compiles fine in one class. In another class, i...
I need to do a linq query that selects based on date, problem is the date format in the database has additional time information and the select query value does not.
Database Value: 1/17/0...
What is the "not equal" operator in a linq to sql select statement
Say I have something like...
db.customers.Select(o => o).Where(o => o.surname ... DOES NOT EQUAL "SMITH"
What is the...
My Project: Windows Form App written in C# VS2008
I am seeking some advice and possible example for the following dilemma. I am new to Linq To Sql and Linq To DataSet and I am trying to find ...
Say, I have a DataTable with Customers and another DataTable with Orders,
Can anyone illustrate how to write a LEFT JOIN using LINQ (C#)? and get the result as a DataView?
Thanks
BT
I have a query:
Return (From role In oEntities.aspnet_Roles _
Join menu In oEntities.sssMenuRole On role.RoleId Equals menu.RoleId _
...
I am querying an XML file using Linq to XML in order to filter my list. This works fine. However I would like to Group the list by category and order it be category count. When I try to add...
hi, i have a LIST<t> and a dataset. i'm using LINQ to join the 2 data objects together and my final result is i want to update the items in the list with linq joined records.
my code is belo...
Hi all,
I'm trying to implement LINQ query on some tables
I have a table called "Raffles", "Orders", "OrderTickets":
Raffles:
-------------------
-ID
-Name
-.......
Orders:
----...
Hi
I've created a LINQ to SQL DataContext class. The designer shows the correct joins on the tables.
How do I query the joined tables in the from clause? Do I need to still specify the ...
How does one go about putting conditions into LINQ, searched the web and can't find a reasonable solution. So if a query string is passed, where statement is added to LINQ, or am I pretty much...