LINQ Query

460

Solutions

335

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

Dear Experts,
How do I can combine the results in this LINQ query?

c.field == 1 below generates results and c.field == 3 generates results but how can I show the list of both results together. T…

720 views
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

I have this statement that returns ISBN and Price. How can I look up values on this result?

(CODE)

417 views

Hello,

I am having some difficulties with getting the correct statement in lambda or linq.  


SQL Query
select count(me.schools_id) as numOfStudent, schools_name, members_exams_examdate
from…

377 views

I have a collection of Product IEnumerable<Product> products.
            How can i filter this collection with an IList<string> items using linq.

116 views

I am accessing a jSon response using LINQ query. Attached is the Json response, the class I have declared with the fields and my LINQ query.

I have to group the items if they have the same Descript…

526 views

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…

245 views

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 …

1645 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…

1049 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…

645 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…

944 views
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

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…

342 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…

560 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. …

544 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…

659 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 …

656 views

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…

361 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…

3867 views

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

260 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…

144 views
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

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…

355 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,
 …

1170 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",

379 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": [
   …

1257 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…

866 views

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)
        {
          …

468 views
Show more content
201506-LO-Top-001
Top Experts In
LINQ Query
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!

RELATED TOPICS view all topics

  1. C#
    (91,122)
  2. .NET Programming
    (131,532)
  3. Visual Basic.NET
    (91,860)
  4. ASP.NET
    (123,019)
  5. MS Development-Other
    (47,925)
  6. MS SQL Server
    (156,654)
  7. Query Syntax
    (47,287)
  8. XML
    (19,947)
  9. Programming Languages-Other
    (19,670)
  10. MS SQL Server 2008
    (48,736)