ASP.Net MVC Issue: Form With Get Method Not Passing Request Values
DISCLAIMER: This has a solution but there has to be a better way. So I came across a really odd situation with the MVC framework today, and I’m on the edge of some serious Nerd Rage. Here’s the issue: I have a route that looks like this: “{controller}/{action}/{roomId}/{name}” And a form that looks like this: [...]
Entity Framework: LINQ to Entities only supports casting Entity Data Model primitive types
So in typical tool fashion I posted this little gem without realizing a glaring error… the order by clause. The whole idea is to create a method that can get a collection, sort it, then grab a certain number for paging. The issue was this: Expression<Func<K, IComparable>> orderBy The problem comes in when the entire [...]
A relationship is being added or deleted from an AssociationSet … With cardinality constraints, a corresponding … must also be added or deleted.
So I ran into this error yesterday trying to delete a user which in turn has multiple collections that would be deleted too. You would think that I would have to manually delete the entire User tree, on collection at a time. Well the way thing work is that Entity framework will do the work [...]
My jQuery Primer
So you have been reading about jQuery and want to dive in and try some? I recently attended the MSDN Dev Conference in Detroit where jQuery integration and client-side programming were very hot topics. With Microsoft’s acceptance of the open source library, I figured I would give it a try. This is what I have [...]
Change Target Framework on a Class Library (Visual Studios 2008)
Ok so this is a quick one but annoys the hell of of me. Basically I am working with a 2.0 class library project and I wanted to use Linq. Now you would think when you “upgrade” the project to 3.5 using the wizard, the target framework would follow. Well, you are stupid. Now for [...]
Cannot Resolve Method, Can’t Infer Return Type, and Funcs
So ran into this today and the answer was actually a lot easier to understand than I thought it would be. Say you want to order a list of objects by a number. Seems simple. Now if you have been paying attention you would know I like using Funcs. Func<SomeClass, Int32> orderByNumber = currentClass => [...]
Like versus Contains in Linq
So have to figure this one out. Say you have: private static Expression<Func<User, Boolean>> WhereLikeFirstNameLastNameUserName(String name) { return currentUser => SqlMethods.Like(currentUser.UserName, “%” + name + “%”) || SqlMethods.Like(currentUser.FirstName, “%” + name + “%”) || SqlMethods.Like(currentUser.LastName, “%” + name + “%”); } And private static Expression <Func<User, Boolean>> WhereLikeFirstNameLastNameUserNameWithoutLike(String name) { return currentUser => currentUser.UserName.Contains(name) || [...]



