linq

  1. A

    Resolved Cannot implicitly convert type error

    I am trying to fetch certain database values and store them in a datatable. After that I am applying linq to group by all the data with account number. I am storing the final result in a list which is of the following class type - class ListItems { public string accountNumbers...
  2. P

    How to access values from 2 datatable as tabel1.tabel2.columnname in C#

    I have one test data model and one excel book which has multiple sheets! all the sheet is having the same unique key "Test1" and I have a function which fetches all the data from all sheets having that key name "Test1" Now after join - I get one table having all the column name and values But...
  3. H

    Question How to call stored procedure with linq connection string?

    My problem is I use linq with connection string instead of dbml file, so stored procedure don't show in intellisense. Is there any way to call stored procedure with linq connection string? Thanks you!
  4. S

    Question Is the MVC redundant?

    I've been trying to decipher how the MVC design pattern works. I have found tutorials that state all of the business logic goes into the Model and others that state all of the business logic goes into the Controller and the data access goes into the Model. I have also come across tutorials...
  5. S

    actually connect to a SQL Server

    I've been trying to figure out how I can use LINQ to query a SQL Server database using C# for 2 days now. I've been through about a dozen tutorials but they all seem to lack that key step where you actually connect to a SQL Server database. I've been working in .NET and SQL Server for over 15...
  6. DracoConstellation

    FYI Amusing C# [Properties, Collection initialization, LINQ, etc.]

    Hi everyone. To avoid long stories I'll get straight to the point... Being a programmer, I check third-party open-source projects. Over the time I have collected a number of interesting C# features that I would like to share with you. Properties and how they can be used As we all know, a...
  7. B

    Tip Introduction to LINQ Queries

    LINQ (Language Integrated Query) is a feature introduced in Visual Studio 2008 used for querying and updating data. It can be used with databases (LINQ to SqL, LINQ to Dataset, LINQ to Entities), XML (LINQ to Xml), and with Objects (LINQ to Objects). LINQ architecture in .NET: LINQ has a 3...
  8. O

    ERROR: An entity can only be attached as modified...

    Hi all, I hope you can help me. This is an issue I have been battling with for days now, and I am struggling to resolve it. My setup: I am using VS2015 Community Edition I am using LINQ to SQL .Net 4.5 I have read up quite a bit on this specific error, and it seems there are a couple ways to...
  9. A

    List of class objects - Filter class objects with same values using LINQ

    Hi, I am using a class object (clsDetails) to store the player details as shown below. I am trying to filter a list of Class objects with same values using LINQ. I want to get the list of Players who are successful in all the 5 attempts. I am trying to get the do it using LINQ but it does...
  10. A

    SQL Data to specified JSon Format

    LIST Time Status A 22:05 0 B 22:10 1 C 22:30 1 A 22:40 0 C 22:50 1 B 22:60 1 The above table needs to be converted to below JSON format [ { "name": "A", data: [ [22:05,0], [22:40,0] ] }, { "name": "B", data: [ [22:10,1]...
  11. J

    Question Datagridview giving errors on adding a new row on the comboboxcell

    Hello, I have problems with a comboboxcolumn in a datagridview: As I want to insert a new row, I get a "System.ArgumentException: The value of the DataGridViewComboBoxCell is invalid." I am using Linq to SQL to populate the data from different tables: - Table Customer (ID (key), Name,...) -...
Top Bottom