1. G

    Search IIS SMTP log file for distinct "from" address' and count

    Hi, I am trying to create a program to read through IIS logs and count the unique "FROM" address, and count how many emails that address has sent. I have done a horrible version of it, based on knowing the emails in the file already, but I am trying to polish this up now but getting reading the...
  2. A

    Question Develop a Linq query

    Hello, I have a database in Access with this architecture: and I need with Linq to calculate and return the total price of a candidate’s training knowing that only the candidate who has attended at least 5 trainings gets a 20% discount. how to get this result with linq?
  3. M

    LINQ Where one property equals x, return the value of another property

    I have a constructor for an object, which I'm trying to query against instantiations of using LINQ. Where one property has a given value, I need to return the value of another property My constructor is as below: public Job(string organisationType, string contractingOrganisationType, int...
  4. 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...
  5. 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...
  6. 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!
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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]...
  14. 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