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
  • Is this a possibiliy?

    com tutorial question
    2
    0 Votes
    2 Posts
    5 Views
    J
    Maybe I'm missing something, but shouldn't this work? var matches = from request in RequestTable             where request.MessageId == 2 and request.State == State.Completed             select request; Life, family, faith: Give me a visit. From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord." Judah Himango
  • Linq, XML and the continuing need for XPath

    xml csharp linq question
    4
    0 Votes
    4 Posts
    10 Views
    C
    martin_hughes wrote: A while back I can't remember who, and I think it was in the lounge, someone mentioned that there was a specific limitation of Linq that can only be solved with XPath. Can anyone remember who said this, or better yet know what the limitation is? Sorry it took so long to find this, but you posted the message the day before Developer Day Scotland and I wasn't very active around that point as I was too busy arranging a conference. Anyway... Reasons why you still need XPath (that I've found so far): * Not everything you do can be done purely in .NET * XSLT * Having WiX create an installer that configures the config file Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog
  • Bindable LINQ

    csharp database oracle linq com
    2
    0 Votes
    2 Posts
    6 Views
    P
    Very nice. Thanks for the link (no pun intended). Deja View - the feeling that you've seen this post before. My blog | My articles
  • sql to linq.

    help csharp database linq question
    5
    0 Votes
    5 Posts
    9 Views
    J
    Thanks for your replies guys. I had a wee read and messed around. I think I have it cracked but i need to test it yet. What do you reckon of this? Makes sense? Dim result = From a In dc.OFG_AdStats _ Group By AdId = a.AdId _ Into Impressions = Count(a.Type = 0) _ Order By Impressions Descending _ Select AdId, Impressions Thanks JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
  • LINQ to SQL Designer Error

    csharp database linq sysadmin help
    2
    0 Votes
    2 Posts
    6 Views
    L
    Hey For any one who has this trouble in the future - ended up reinstalling VS2008 and it now works. At university studying Software Engineering - if i say this line to girls i find they won't talk to me Dan
  • Named Pipes .Net 3.5

    csharp sysadmin question
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Query in LINQ

    csharp database linq
    2
    0 Votes
    2 Posts
    6 Views
    T
    Simple google search found me this article[^]. Don't be overcome by evil, but overcome evil with good
  • 0 Votes
    8 Posts
    19 Views
    P
    In which case - why not take a look at people's answers to posts in this forum and decide who (if any) you feel that meets your criteria. You could email them via the email link in their replies and explain your position to them - I'm not advocating this because they may construe this as spam, but you could do this. Deja View - the feeling that you've seen this post before. My blog | My articles
  • 0 Votes
    13 Posts
    35 Views
    G
    Roger: Thank you! Joe Rattz suggested the following solution: http://www.albahari.com/nutshell/linqkit.html This solution is provided by Joe Albahari. It's quite convenient. Sheng
  • 2 Lists

    tutorial question
    13
    0 Votes
    13 Posts
    29 Views
    D
    Your solution is perfectly fine for the context where the OP is using it. Mine is more general (doesn't require IList, just IEnumerable), doesn't crash when the lists have different lengths (whether this is good depends of course highly depends on what you want to do). And in your solution, inserting new items in list1 while the query is evaluated will result in an InvalidOperationException (collection modified during enumeration), but inserting new items in list2 doesn't. The Zip solution is symmetric regarding input1/input2 (throws InvalidOperationException in both cases).
  • 0 Votes
    7 Posts
    15 Views
    K
    Watch it guys Knowledge Experts :cool: are Here with Solution Follow the Link http://www.blog.vimallakhera.com/BlogId_2073_BlogItem.aspx (Knowledge Experts) Vimal Lakhera, Senior Software Engineer Corbus (India) Pvt. Ltd. | A CMMi Level 5 Company Cell) (+91) 9818 511 428 E-Mail: info@vimallakhera.com | http://www.vimallakhera.com
  • Couldn't find New Project or WebSite in VS 2008

    csharp visual-studio help asp-net wpf
    2
    0 Votes
    2 Posts
    7 Views
    C
    Wrong forum. Please use the Visual Studio[^] forum for this type of question. Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog
  • Mock LINQ query using Rhino Mocks

    csharp database linq testing help
    2
    0 Votes
    2 Posts
    7 Views
    J
    Oren Eini, the author of Rhino Mocks, wrote a post about it here: Awkward Testability for LINQ to SQL[^]. Be sure to read the comments to that post, Scott Guthrie from Microsoft offers some options for mocking LINQ queries. Tech, life, family, faith: Give me a visit. From my latest post: "It's sobering to watch: the whole country stops for 2 minutes as a siren is blast to remember the 22,437 victims of terror and soldiers who died in defense of Israel..." The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
  • Newbie in LINQ - Just a quick question

    question csharp database linq regex
    2
    0 Votes
    2 Posts
    6 Views
    E
    It would have been helpful if you explained exactly what you wanted but is this the kind of thing you're after? var results = from s in students where teachers.FirstOrDefault(t => (t.Subject == s.Subject)) != null select s.Last + " " + s.First + " MARK: " + s.Scores[0]; I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
  • LINQ DataSource and Foreign Keys

    csharp tutorial database wpf wcf
    2
    0 Votes
    2 Posts
    7 Views
    E
    Well i figured it out and the problem was with my Eval statement, nothing to do with LINQDataSources or the gridview. Eval("User1.UserName") is how it should be done instead of Eval(User1.UserName). I thought the days of missing ; or " off your code were long gone but obviously not :laugh: Kev http://esendexdeveloper.spaces.live.com/
  • Does table relationships is necessary in .dbml file

    csharp asp-net learning
    3
    0 Votes
    3 Posts
    6 Views
    R
    Thanks.... Ranjeet Singh
  • DotNetNuke

    help design data-structures debugging
    2
    0 Votes
    2 Posts
    6 Views
    P
    Imthu wrote: I am new to DNN .. while creating report module i am getting this error. Error: UserReports is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Unable to cast object of type 'ASP.desktopmodules_userreports_viewuserreports_ascx' to type 'DotNetNuke.Entities.Modules.PortalModuleBase'. ---> System.InvalidCastException: Unable to cast object of type 'ASP.desktopmodules_userreports_viewuserreports_ascx' to type 'DotNetNuke.Entities.Modules.PortalModuleBase'. at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace --- I'm confused. Whereabouts in this question is there anything that leads you to think that this is the appropriate forum for this question? Wouldn't you be served better by asking this on a specialist DotNetNuke forum? Seriously, I doubt you'll get much joy in a Linq/.NET3.5 forum with this question, so I would ask you to consider posting this on a DotNetNuke forum. Deja View - the feeling that you've seen this post before. My blog | My articles
  • If linq is not part of the CLR...

    csharp dotnet linq com game-dev
    5
    0 Votes
    5 Posts
    15 Views
    J
    Mmm, sure, it's about public face. But I don't understand - since LINQ stuff can leak out (after all, the basic structure of LINQ is IEnumerable<T>, which is CLS-compliant), it ought to be CLS-compliant. I think it is, but I'm not 100% certain. Tech, life, family, faith: Give me a visit. From my latest post: "The world will call you weak, unintelligent, and foolish for following God. Don't worry about them. God's picked the foolish things in order to put the world's wisdom to shame." The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
  • Passing var's around

    csharp linq design algorithms data-structures
    4
    0 Votes
    4 Posts
    9 Views
    J
    Something like that. You may need to still do: var nestedGroup = blah blah blah; var suppliersWithMailBoxes = ConvertNestedGroupToSuppliers(); // something like this. You get the idea.
  • linq to sql: conditional where clause

    database help csharp linq question
    7
    0 Votes
    7 Posts
    18 Views
    M
    hi Daniel, this one is AND condition. How to implement OR Condition. Thanks in Advance! Have A Nice Day! Murali.M Blog