Advertisement

250 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested LINQ Solutions: 1 - 25 of 47
 
I would like to know how to convert this SQL Query into a LinQ equivalent: SELECT nContractDeliverables.* FROM (nContractDeliverables  INNER(Join) nContractPaymentLines ON (nContractDeliver...
How would I replicate the following in Linq, a select in statement: SELECT * FROM Products WHERE Products.ProductID IN(5,7,8,12) Anyone?
I'd like to mae an IN query in LINQ. I've found a sample, but I need more. THIS WORKS: SQL: SELECT [t0].[ProductID] FROM [dbo].[Product] AS [t0] WHERE ([t0].[ProductID]) IN (@p0, @p1,...
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, I am using Linq to SQL and have created various objects using the OR Mapping tool. I have set up the following query: Dim MfrCode() As String = From M In Db.ManufacturingCompanies _...
I can query in Linq to return a collection from the database and then in turn bind that to a WPF ListView.ItemsSource. The problem is, the ListView does not update when the database is chan...
It appears the following code cause a problem that took me an hour and half to find the solution to.  There was only one related artice on the web I could find, so I thought I would post the p...
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 ...
Hi Experts, My Sql table looks like this: CategoryId ParentCategoryId CategoryName I have a categoryId and I want to list all the parents up the root category. I use linq and I kno...
I have 3 tables (that matter in my DB) FantasyTeams -FantasyTeamId PK -TeamName PitcherTeamMatrix -MatrixId  PK -FantasyTeamId -PitcherId Pitchers -PitcherId -PitcherName -W...
I am merely attempting to convert a string of a date to a DateTime object in a LINQ query. The code is as follow, can anyone familiar with LINQ assist me? I have a hard coded example that I ca...
Hi, I have a class that is currently designed to work as follows: Customer c = Customer.GetByID(5); c.Name = "John Smith"; c.Save(); I'm moving to linq, so I designed my Customer cl...
Hi, I am new to LINQ and was wondering how I would write the following SQL query in LINQ SELECT Sum(totalTendered) FROM Batch Where convert(varchar,LastUpdated,101) = '11/01/2007' T...
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 am new with Linq to Sql. I don't want to use "for each next", because I am returning one record. I tried, Dim db As New Ticket_JCDataContext                 Dim ThisTicket = (From t In ...
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...
Hi,        I've been looking for references about LINQ on OTN and can't seem to find any.  Does Oracle support LINQ? Thanks, Pat
I am trying to use LINQ to insert records into a table. One of my values comes from a dropdownlist.selectedvalue and is a UNIQUEIDENTIFIER data type. For some reason upon the insert, I keep ge...
Hello Experts, I create a function which returns an IQueryable or IEnumerable like this: object MyFunction() { var result = from Categories in dataContext.Categories                    ...
I want to query a table and return a list of distinct people. BUT I do not want empty entries that will given a blank line in the combobox e.g  Dim person =From p In Db.CDRs Select p.Appr...
I would like to concantenate two database fields to make a first-last name string for an end result in a search. I am trying to use the sql server wildcard with LINQ. Can anyone see what I am ...
Hi, I am using LINQ to SQL, and one thing I don't like about it, is that it automatically adds connectionstring to my .config file and use a connection string key in the generated code, si...
I am trying to convert a NOT IN sub query into the LINQ definition but can't fugure it out.  Anyone have an idea? SELECT * FROM Permissions WHERE Permission_ID NOT IN ( SELECT Permissio...
I have the following XML file. I want to query this XML file to retreive the name attribute of the Group Element, given a Microsite name. How do I do this in LINq? Is LINq the best way to d...
Hello All I have installed VS2005 + 3.0 framework. I cannot find any reference to Linq. Could anybody tell me please how do I use Linq in VS2005 with 3.0 framework? Thanks in advance!