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
  • group by [modified]

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Linq and blob objects

    csharp database linq help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • insert issue

    csharp help linq mcp
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • update issue

    csharp mcp help question announcement
    3
    0 Votes
    3 Posts
    0 Views
    T
    yes , it is , but there are no primary keys in that particular table , can that be an issue? Tauseef A Khan MCP Dotnet framework 2.0.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • HOW TO ANSWER A QUESTION

    c++ architecture help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How to get an answer to your question

    help csharp c++ html
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Deleting a list of objects

    help question
    3
    0 Votes
    3 Posts
    0 Views
    T
    Ok, that was it. Thank you! For more information see: http://weblogs.asp.net/zeeshanhirani/archive/2008/03/26/select-many-operator-part-1.aspx[^]
  • Frequency Count In LINQ

    csharp linq question
    7
    0 Votes
    7 Posts
    0 Views
    E
    I remembered such class exists. When I was answering the question I thought it was System.Collections.CaseInsensitiveComparer but I checked and it isn't an IEqualityComparer. Gideon Engelberth suggested ToLower so I decided to go with it at least to illustrate the IEqualityComparer interface. Thanks for reminding me where to find it :) I'll try to never forget it again, it is an IComparer too :cool: Eslam Afifi
  • Introduction to LinQ

    csharp linq
    2
    0 Votes
    2 Posts
    0 Views
    N
    Try here[^] only two letters away from being an asset
  • 0 Votes
    2 Posts
    0 Views
    P
    What you would do is create a list of IDs that you want to delete and then use the Contains statement. Here's an example: List<int> list = new List<int>(); list.Add(5); list.Add(9); list.Add(58); list.Add(7); var result = from r in db.Role where list.Contains(r.ID) select r; I've just knocked this up in the Code Project textbox, so I apologise if the formatting isn't 100%. "WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes. My blog | My articles | MoXAML PowerToys | Onyx
  • updating in entity framework

    help csharp asp-net
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Query Out pixel data

    csharp database linq performance help
    4
    0 Votes
    4 Posts
    0 Views
    E
    If you're doing this operation only once for an image, you can determine while looping with pointers if a color is in the desired area or not and build the list then group or even build the histogram directly. If you would be doing the operation many times for an image, you can build the list the same way you're doing it once then later filter the elements based on the color index in the list using this Where overload[^] before doing the grouping. To know if an index is in an area xI = index % width yI = index % height xI >= x1 && yI >= y1 && xI <= x2 && yI <= y2 that (x1, y1) is the top-left pixel of the area and (x2, y2) is the bottom-right pixel of the area A faster method is to determine the index corresponding to the top-left pixel the loop over the list elements inside the area and build the histogram directly (or build an array and group but this is slower and requires more memory). Eslam Afifi
  • Entity Framework should be simple, right? [modified]

    question com help
    3
    0 Votes
    3 Posts
    0 Views
    O
    Edited. Thank you Should work how
  • Polymorphism Questions with EntityFramework

    question csharp database linq oop
    2
    0 Votes
    2 Posts
    0 Views
    P
    Hej Juvil John As i se it custum1 is first set as a CustomClass1 object and is given a new reference to it. The you move the reference to baseclass witch is a class1 object. Butt here comes the strange thing you show this baseclass = ( LINQ to EDM Query).First(); Witch should render the first code meaningless since the reference to the CustomClass1 is now gone and replaced whit the first object of the query ( witch i don't now the type of butt i am assuming its a class1 since your not casting it). So then you cant cast it back because the object its now referenced to is of the wrong type. If i gott it rigth then tell me what your trying to accomplish by this( Adding methods tho the type ?? ) Becuse then there is other ways of doing it.
  • Is LINQ the best technology for my application

    database csharp help linq
    5
    0 Votes
    5 Posts
    0 Views
    M
    thanks for taking the time to reply - I will put two big ticks in the Linq box :-)
  • 0 Votes
    2 Posts
    0 Views
    P
    Hi all, Nevermind ... stupid mistake ... never took the spaces out of the second List :omg: :wtf: The only programmers that are better C# programmers, are those who look like this -> :bob: :)Programm3r My Blog: ^_^
  • Sub Query In Linq

    linq csharp database help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Problem when inserting a new Row

    database csharp linq data-structures debugging
    2
    0 Votes
    2 Posts
    0 Views
    D
    Before adding the new record have you commited all previous updates (i.e. the deletion) to the database? If you've only marked it as deleted Linq is very likely to get confused as it will still exist within its internal collections.
  • 0 Votes
    11 Posts
    0 Views
    P
    Thanks i will go through and try to solve my problem...