20 results for author, Bryan Robinson...

Dynamic LINQ Database Selection for Oracle .NET

posted by Bryan on under Data & Databases

Using an Oracle database backend in conjunction with LINQ required use of a 3rd party tool called DevArt dotConnect for Oracle. However, when the database model is configured, it's hard coded to a specific database instance (Dev, Test, etc). I wanted to dynamically select which database instance to run against relative to the lane my tests were running against. It's actually easier than I thought.

Running NUnit tests on .NET 4.0

posted by Bryan on

We've recently moved some of our tests from the .NET 3.5 framework to run against the .NET 4.0 framework. I updated the Project target framework to be 4.0 as well. However, I was getting this error: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. After some research, it required a pretty easy fix.

Sorting an IList using LINQ

posted by Bryan on under Data & Databases

We have a custom object called ListOption in our code. It holds category, value and option and fairly represents the basics of a single SelectList item. To hold the ListOption values, the primary developer stored this List as and IList instead of an ArrayList or any other concrete type. OptionList extends IEnumerable.

Here is how I sorted the IList.