LINQ Query

453

Solutions

328

Contributors

Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages, although ports exist for Java, PHP, JavaScript and ActionScript. LINQ extends the language by the addition of query expressions, which are akin to SQL statements, and can be used to conveniently extract and process data from arrays, enumerable classes, XML documents, relational databases, and third-party data sources.

Refine results

I am working on the attached jSon response. I need to read the sub-array named "details" and populate a datagrid.
I am using VB.NET.

Attached is how I declared the classes to be used in my LINQ qu…

213 views
Course: From Zero to Hero with Nodejs & MongoDB

Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

Hi,

I added a new employee to SQL table.
Add(3, "Issy", "Holm");
And I added this to the List.
(CODE)


Then, check this in the sql db.
I have a DataTable called dt. Now here is what I want …

1631 views

Hi

I had question on this Refactor C# code (https://www.experts-exchange.com/questions/28958730/Refactor-C-code.html).

How do I query this if we have more than Single record for SalesOrderType(M…

1035 views

I have the following method and its a linq statement.


I would like this method to update the database.

If there is any failure I want it to return false..

else true..

So I can use that v…

626 views

I would like to get the percentage of a "type" of questions within an exam.  I am able to get the total number each  "type" of question and I am able to get the total number of questions in an exam. I…

931 views

I have a .net winform with a text box for file types.

A user would key in the text box a list of file types separated by a comma.

I would store that string in a variable like so below.

Then I…

328 views

I have a data object that I pass to my gridview user control as a generic list and I would like to just use the fields/properties that I am returning from the stored proc I am running. My object has a…

539 views

Figured out how to update most of the XML elements.  I'm having issues with two.  I want to updated the Attribute and another value as shown below.  I want to update everything that has 123 with ABC. …

524 views

I have the following query working in my code and now want to move into a separate class as a method that I call with List<Logrecord>, but having trouble determining what TYPE I need to return from th…

639 views

Hi All

I have below query. I want to filter items and do not want to add new salesOrders()  where startDate is Empty.
If startDate is Empty I want to remove it.

req.sOrders = (from document in …

640 views
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

I have a linq query which is pulling data into my object model.  Problem is that I'm getting an error because when I convert it it is an empty string.  How can I convert it to a null if it is an empty…

341 views

If I have the below XML.  I want to do 2 things.

First get everything between <key></key> so I can fill up my models in my .NET code.  
Second Delete Key id 123 and everything between

How can I…

3843 views

Is there a shorter way to write this so no  looping is involved?
(CODE)

235 views

So, I have a model.  I was using the below code.  I'm  adding data from a collection to another.  It was replacing it but I need to add it.
(CODE)
I tried below
(CODE)
But I'm getting the below er…

128 views

I found this code and I am able to use it in another program with no problem.  It gets me the total of the line items checked.

Now I need to change it but I haven't seen code written like this. Can…

336 views

I am using NewtonSoft to convert JSON to classes.
Below is the JSON response with array of inventory that incldues a single array of contacts.

{  
   "inventory": [
   {
     "ItemId": 123,
 …

1150 views

I receive a JSON response in the following syntax, where it is returned as objects and not array. Is this right?

{
   "status": "OK",
   "product":
   {
     "name": "ABC",
     "code": "A",

345 views

I am slowly getting a hang of JSON. At this point I am stuck with the issue of populating a datagrid in VB.NET from a JSON response. The JSON response is something like

{  
   "inventory": [
   …

1240 views

Hi guys,

I am querying a Sql database with LINQ and I listed to show it in view. The problem is the data which come from sql is pretty big like around 100000 rows and when it sends to the view it i…

847 views
Lean Six Sigma Project Manager Certification

There are many schools of thought around successful project management, but few as highly regarded as the Six Sigma and Lean methods. With 37 hours of learning, this training will explain concrete processes for increasing efficiency and limiting wasted time and effort.

I just want return class library - Domain.User
I assume I can use uTmp as class to return but I do not know how to do.


public Domain.User ReadCommonUserInfo(string userID)
        {
          …

450 views

I am using an  XML file to keep track of files moved, no I want a function to return the files not in both table that match a file pattern.  
Both xmaster and xsublist return elements with sub elemen…

1245 views

SELECT Age FROM Testing WHERE(AgeUI = 'Selected')
SELECT BenefitAmount FROM  Testing WHERE(BenefitAmountUI = 'Selected')


CREATE TABLE [dbo].[Testing](
      [ID] [int] IDENTITY(1,1) NOT NULL,
      [Age…

367 views

I am using LINQ to loop through a List<List<string>>. The format of this collection looks like this:

QuoteNum, QuoteCoverage1, QuoteCoverage2, QuoteCoverage3, ...

Example:
1, Auto, Auto, Health…

357 views

I am using VS 2015 and have the following object:
(CODE)

I have the following declaration:
CatholicLinksResponse catholicLinksResponse

I want to order the Links list in catholicLinksResponse b…

471 views

I have below codes with linq and it works. It return 1 LIst<string> from x.UI_Benefit.
However, I want to return two List<string> From new column call x.UI_Amount.
How can I return two list<string> …

777 views
Show more content
201506-LO-Top-001

RELATED TOPICS view all topics

  1. C#
    (90,846)
  2. .NET Programming
    (131,250)
  3. Visual Basic.NET
    (91,580)
  4. ASP.NET
    (122,806)
  5. MS Development-Other
    (47,908)
  6. MS SQL Server
    (156,015)
  7. Query Syntax
    (47,076)
  8. XML
    (19,862)
  9. Programming Languages-Other
    (19,624)
  10. MS SQL Server 2008
    (48,407)