Skip to content

LINQ

LINQ (all flavours)

This category can be followed from the open social web via the handle linq-e04cf296@forum.codeproject.com

783 Topics 2.8k Posts
  • a

    4
    0 Votes
    4 Posts
    6 Views
    R
    Not a good start to your CP life! "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
  • 0 Votes
    4 Posts
    4 Views
    M
    This link may come in handy to gather the primary key fields: http://naspinski.net/post/Get-the-Primary-Key-PropertyInfo-of-any-Linq-to-SQL-Table.aspx[^] Let us know if you make any progress.
  • trouble to get data from stored procedure with linq

    help csharp database linq question
    2
    0 Votes
    2 Posts
    3 Views
    L
    I Googled and found many answers. Hope this help! Peace ON In Simple Sense... Start Shining Stories We Live...
  • populate dictionary from the intersection of two list collections

    tutorial
    3
    0 Votes
    3 Posts
    3 Views
    L
    Please give us sample code to work out. Peace ON In Simple Sense... Start Shining Stories We Live...
  • 0 Votes
    5 Posts
    7 Views
    W
    Guess it was a nonsense univoter. Fixed it as what you did was the right thing. If you find the answer yourself, then definitely post the solution, as other people may run into the same problem, and your solution may save someone else a few hours. :laugh: When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
  • Login Page with the help of Linq

    database csharp linq regex help
    3
    0 Votes
    3 Posts
    5 Views
    A
    hi, check this link. it is opensource .net project. you can learn lot more things from this. thanks -amit.
  • Copytodatatable usage in VB

    csharp database dotnet linq regex
    3
    0 Votes
    3 Posts
    5 Views
    P
    Have you tried getting a list of all the rows and then do a CopyToDataTable dim query=(from customers in dtcustomers.asenumerable where customers.state = "VA" select customers).ToList dim dtNewTable as datatable=query.copytodatatable
  • Declare TimeStamp in dbml

    csharp help sharepoint database linq
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Serializing Linq

    csharp database wcf linq oop
    2
    0 Votes
    2 Posts
    5 Views
    U
    Out of the box EF4 entity objects do not support serialization. You need to convert your model to POCO objects using the ‘ADO.NET POCO Entity Generator’ or the ‘ADO.NET DbContext Generator’(depending on your EF4 version). This can be done automatically by right-clicking on the model design surface and selecting ‘Add Code Generated Item’. From the dialog, select ‘Online Templates’ and the desired generator. Type a name for your T4 template (your model name). A simple POCO class will be created for each entity. To send and receive the POCO classes over the wire via WCF you will need to add some class files/ class project (CyclicReferencesAware and DataContractResolver) and some supporting attributes to the code generated web services interface classes. Here are some links (walk troughs) that explain the process. http://www.sanderstechnology.com/2010/the-ado-net-entity-framework-poco-objects-and-you/10142/ http://blogs.msdn.com/b/adonet/archive/2010/01/25/walkthrough-poco-template-for-the-entity-framework.aspx
  • Issue with Imultiple Results

    csharp sharepoint database linq help
    2
    0 Votes
    2 Posts
    4 Views
    L
    What I have done in the past is capture each return in the mapping. So in your SPROC, comment out all but one of the selects. Then map the SPROC. You will then end up with an entity object. Copy the code for that object to another file. Rinse and repeat for all of the objects. Then you can specify which object. So if I have a SPROC GetEmployee but it also gets all of the Projects that the employee works on I can say var projects = GetResult<Projects>(); Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
  • C# datacontext with linq?

    csharp asp-net linq sales tutorial
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Find specific table in .dbml

    csharp database linq question
    3
    0 Votes
    3 Posts
    5 Views
    S
    THANK YOU!!! Will be very helpful when making changes in the future.
  • LINQ to DbProviderFactory

    csharp database sql-server linq sysadmin
    5
    0 Votes
    5 Posts
    7 Views
    F
    Timothy, as the others already stated, it is depending mostly on the vendor of the Db. For example, see this Oracle discussion (by now the ODP with Entity support should be out): https://forums.oracle.com/forums/thread.jspa?messageID=2325615[^] If you want to write your own, it could take some time though... I think is is a non-trivial task. For what Db´s are you looking for? See also the various 3rd-party alternatives in the discussion...
  • 0 Votes
    2 Posts
    3 Views
    S
    I manage to solve it. Dim sum3 = Aggregate s In lqcus.stocks Into Sum(s.qty) Thanks to every one who look at it.
  • Why Linq to SQL?

    database csharp linq com question
    2
    0 Votes
    2 Posts
    4 Views
    N
    Linq to SQL is a ORM, Object Relational Mapper, tool. It is more than just a way to run queries. It removes the need for the developer to hand create entities, execute queries and map the result sets to those entities. It gives the ability to track changes when objects have been modified. Plus a host of other things. You can still use stored procs with Linq to SQL. I know the language. I've read a book. - _Madmatt
  • Get Current Identity value of the table using LINQ.

    csharp database linq help question
    2
    0 Votes
    2 Posts
    4 Views
    A
    See if one of these work: int num = DataContext.ExecuteQuery<int>("SELECT IDENT_CURRENT('SomeTable')").First(); Int16 num = DataContext.ExecuteQuery<Int16>("SELECT IDENT_CURRENT('SomeTable')").First(); Though, like somebody else said in one of your other cross-posts, this may not be the best way to go about doing this. The ideal way depends on how you are inserting records. Driven to the ARMs by x86.
  • Timeout

    csharp database linq sysadmin help
    3
    0 Votes
    3 Posts
    5 Views
    T
    Look at this Troubleshooting: Timeout expired[^] thatraja **My Tip/Tricks My Dad had a Heart Attack on this day so don't... **
  • 0 Votes
    8 Posts
    9 Views
    L
    I'm up in Applecross on the west coast. It's a small peninsula opposite Skye but on the mainland. If you Google "Applecross Pass" you'll see the road. Oh, Google is real cool today!:cool: It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
  • Empty elements

    database xml help question
    4
    0 Votes
    4 Posts
    6 Views
    S
    Yes correct. This should work without any format exception. :) Thanks