Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:755757
More Search Options
RSS Available
Matching Posts
Linq "Take" method: Sequence Contains No Elements
I'm using the Take method in Linq: public MyObject GetMyObject() { return (from myObject in db.MyObjects where (whatever) orderby myObject.date descending select myObject).Take(1).Single(); } So as you can see, myObject contains a date field and I'd like to grab the latest one. Sometimes, however, the where clause will result in an empty set, this is both expected and desired. However, if it is an empty set, I cannot use the Take object, lest it result in the error message in the subject
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
AceCorban
on 11/28/2009
Re: How to start?
Sweet, well good luck. This forum is great if you get hung up on something. The best way to practice your skills when developing an app is to think of something you would enjoy making. If you have fun making it, it is much easier to learn.
Posted to
Getting Started
(Forum)
by
AceCorban
on 11/19/2009
Linq to another Database
Let's say there is a master application that has a database, and other applications that are built as sub applications. They need to have their own databases, but might need to share some pieces of data in the master database (even associate with them through foreign keys if possible). The question is can this be done? I know SQL allows pulls from different databases if the database name is used and the user has access, but can Linq create those associations as parent/child entities?
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
AceCorban
on 11/17/2009
Re: How to start?
Start here: http://www.asp.net/get-started/ There are links to helpful videos that should get you developing some basic apps pretty quickly. I'd start by installing visual web developer and following along with those videos.
Posted to
Getting Started
(Forum)
by
AceCorban
on 11/17/2009
Re: How to start?
In that case, I like the Nerd Dinner tutorial: http://nerddinnerbook.s3.amazonaws.com/Intro.htm It goes over how to implement a fairly complex web application, but really walks you through it step by step. A disclaimer: It goes over the MVC framework, which is different from WebForms. MVC is pretty awesome in many respects, but I've actually shelved my MVC knowledge for a while until IIS 7 hosting is more prominent (hosting an MVC app on IIS 6- can be a pain for a lot of reasons). That said,
Posted to
Getting Started
(Forum)
by
AceCorban
on 11/17/2009
Re: Does Session.Abandon delete the Cookie?
The quick answer is: "No, it does not delete the sessionID cookie". I actually had this issue and posted this thread about it: http://forums.asp.net/t/1446995.aspx budugu had a neat suggestion to do this: Session.Abandon(); Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", "")); which basically just overwrites the existing cookie with blank information.
Posted to
State Management
(Forum)
by
AceCorban
on 11/17/2009
Re: Help with Linq Query to find tagged items
Got it: var query = from item in db.Items where (item.title.Contains(searchStr) || ((from itemTag in db.ItemTags where ((itemTag.itemId ==item.id) &&(itemTag.Tag.title.Contains(searchStr))) select itemTag).Count() > 0)) select item;
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
AceCorban
on 11/16/2009
Re: GridTemplate based on value of Container.DataItem["status"]
Turns out I can do this: <a href="javascript:<%# ((Convert.ToInt32(Container.DataItem["status"]) == Globals.ENABLED) ? "disable" : "enable") %>Object('<%# Container.DataItem["ID"] %>');"><%# ((Convert.ToInt32(Container.DataItem["status"]) == Globals.ENABLED) ? "Disable" : "Enable") %></a>
Posted to
Getting Started
(Forum)
by
AceCorban
on 11/16/2009
Re: TreeView state saved to session, but during which event?
Well, this feature was put on the backburner with everything else that is going on, so I never got to find a solution for this yet.
Posted to
Getting Started
(Forum)
by
AceCorban
on 11/13/2009
Help with Linq Query to find tagged items
I have a table we'll call "Item". It has a varchar "title" and some other fields. There is also a "Tag" table which is nothing more than a varchar "title". The same tag could very well be associated with many items, so there is a many-to-one association table I call ItemTag that has a foreign key to Tag and Item. So within Linq, my Item object has a list of ItemTags that are associated with it so I could do something like this to, say, display all tags
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
AceCorban
on 11/13/2009
Page 1 of 104 (1035 items) 1
2
3
4
5
Next >
...
Last »
Channel 9:
TWC9: XAML tools, Silverlight for Live Writer, Surface SDK,
Channel 9:
C9 Conversations: Brian Beckman on Complexity [C9 Conversations: Brian Beckman on Complexity]
Channel 10:
Black Friday Deals on Windows 7 Machines
Channel 10:
Holiday Shopping on Bing Cashback = Big Online Savings
Channel 10:
Black Friday Deals at the Microsoft Store
Channel 10:
Incredible Black Friday Deal: Windows 7 Notebook for $197
ASP.NET:
Presenting in Europe Next Week
TechNet Edge:
AlignIT IT Manager Podcast #30 - Straight Talk about Windows 7
WindowsClient:
You know your post rate has gone down...
Silverlight:
Geek Profiles – Scott Guthrie
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 9 of 13
TechNet Edge:
Managing Your Virtual World - Tech Focus November 2009 Part 2
ASP.NET:
Silverlight and RIA Services: Implementing Search
Channel 9:
C9 Lectures: Brian Beckman - Covariance and Contravariance in Physics 1 of 1
Channel 9:
Set Your Data Free
Channel 9:
Implementing a Silverlight SharePoint WebPart with Visual Studio 2010
WindowsClient:
New WPF Showcase Addition: Enterprise
Channel 9:
Reactive Extensions API in depth: Contract
WindowsClient:
Concluding "New WPF Features" Series
WindowsClient:
Introduction to TestApi – Part 5: Managed Code Fault Injection APIs
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online