In a previous post, I demonstrated how one could gain access to child collections using LINQ query syntax. I recently answered a question on StackOverflow where someone wanted to know how to do this using lambdas:
Link to Answer On StackOverflow
T-SQL – The Subtle False Assumption One Can Make When Using SELECT to Assign a Value To a Variable
There are a few subtleties when using SELECT to assign a value to a SQL variable. The one we will highlight today is what occurs when the result set of the SELECT is empty.
Querying Over Multiple Child Collections With NHibernate
Typically with NHibernate, I’m always querying over one table and eager fetching it’s child collections. I’m also only performing WHERE conditions on that initial table I am querying over.
The other day though, I needed to solve a problem where I was adding WHERE conditions to the child collections. Now in SQL, this is quite easy but in NHibernate, it took me a while to figure out how to do this efficiently.
Who is on the Server?
Do you have a busy server that a lot of folks are always on?
Do you ever get this dreaded message indicating too many people are already on?
Integrating StructureMap in an MVC 3 Project = Dead Simple
Integrating StructureMap in an MVC 3 Project:
- New MVC 3 Project
- Install StructureMap.MVC3 NuGet Package
- Add the following to Application_Start() in Global.asax.cs:
DependencyResolver.SetResolver(new SmDependencyResolver(IoC.Initialize()));
Upcoming .NET User Group Meetings (September 2011)
Group: North Dallas .NET User Group
Speaker: Keyvan Nayyeri
Topic: Parallel Programming in .NET
Resolving USB to DVI / VGA adapter conflict with Visual Studio 2010
Having troubles running Visual Studio 2010 on a monitor connected through a USB to VGA or DVI adapter? Then your solution will most likely be to turn off hardware graphics acceleration.
Mask a Phone Number Field but Only Save the Numbers using jQuery
Masking a phone number field is relatively easy by utilizing one of the many jQuery masking plug-ins. It will turn your input field from this: 5554449999 into this: (555) 444-9999 which looks much nicer but at the same time that becomes the text that will be sent when you post back the form to the server.
Restrict Access to an MVC Action or Controller by IP Address using a Custom Action Filter
Scenario: You want to lock down access to a particular action or entire controller in your MVC application via the users IP address. This can be particularly useful if you would like to restrict the Admin portion of your website to just your company’s IP address range.
There are several ways to accomplish this task. IIS allows you to restrict by IP Address but what if you want to do it programmatically…
T-SQL – Easy Cursor Optimization by Defining Attributes
When creating lengthy T-SQL queries, sometimes a set-based approach just doesn’t cut it.
So when you find yourself going with a procedural-based approach and using a Cursor like a foreach loop, be sure to check out the the available attributes for Cursors to boost performance.