Browsing the blog archives for May, 2009.

LINQ to SQL Dynamic Connection String

.NET, Technology

Note: If you are subscribed to our blog for house related content, and would prefer not to read nerd-speak, change your RSS subscription to: http://www.shaneandcasey.com/category/house/feed/

I’ve been looking for a clean solution to having a dynamic connection string for a LINQ to SQL data context. My primary desire for this is developing/debugging an application on a test database. Sure, you can always go change your connection string in the app.config file, but I tend to forget to revert it back before deployment.

After doing a bit of research today, I realized that if you open up the project’s property pages, click on the settings tab, and then click on ‘View Code’ on the top, you’ll access the “base” partial Settings class. In the constructor, add an event handler for the SettingsLoaded event handler:

this.SettingsLoaded += new System.Configuration.SettingsLoadedEventHandler(Settings_SettingsLoaded);

Then you can set up the event handler in a similar manner:

///
/// Dynamically update settings for development when a debugger is attached
///
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e)
{
    if (System.Diagnostics.Debugger.IsAttached)
    {
        // Adjust the connection string as you see fit
        this["yourConnectionStringName"] = "Data Source=yourDevHost;Initial Catalog=yourDevDatabase;Persist Security Info=True;User ID=yourDevUser;Password=yourDevPassword";
    }
}
2 Comments

Settling In

House

We are finally getting to the home stretch in the burst pipe restoration work. Our main contractor moved all of his tools out of our kitchen for the first time in almost 5 months. We have a 100% functional kitchen to use now. You have no idea how good it feels to say that.

We haven’t started the “decorating” phase in the kitchen yet, but here are some non-cluttered pictures of our kitchen:

img_3513

img_3515

Things to note in the pictures:

  • The ceiling is a tile wallpaper that was painted with a (much too expensive) copper looking paint
  • The refrigerator door opens too close to the wall. We’d do that different if we could
  • The upper cabinet to the left of the fridge is awkward as it has a shelf thing on the door. Hard to get to stuff in there. We’d do that different if we could.
  • You can’t see it, but our appliances need a good buffing

I also installed a vanity sink top and faucet in the basement bathroom. We don’t post a lot about this room as it doesn’t have any historical character. It has a fiberglass tub/shower, a new toilet, washer and dryer, and a new sink. Eventually we’ll make it a bit more charming, but for now, it is function over form.

img_3517-1

img_3516-1

img_3519-1

Things to note in the pictures:

  • The pine trim will be painted white (gotta do whatever you can to make it feel as bright a possible in the basement!)
  • The door needs to be stripped and repainted

Also, my office is finally getting put together!

img_3524

img_3525

Ignore my fancy desk chair. I know you are all jealous. It is mine, all mine. Ignore the mess on the desk as well, I haven’t quite gotten to the organization part of assembling the room yet.

In the office, we’ll be stripping all the trim eventually. For now, we are going to take a breather from stripping wood. I haven’t made a post about it, but we’ve stripped I swear close to a mile of trim in the past two weeks. We are sick of stripping wood.

Also, one of the benefits of moving our furniture to the main floor is our basement is slowly becoming more manageable:

img_3521

Still a disaster area, but not nearly as bad. Once we FINALLY close on our loan Friday (yes, it has been almost 5 months since we were supposed to close!), we’ll probably start tackling this mess.

As you can tell, this post is making for lots of lost time! So to continue jumping around, I’m going to show you our new and old baseboard trim. In our upstairs bathroom, and downstairs kitchen, the original baseboard was long gone and we didn’t want to put the cheap stuff back in. So we had ordered some douglas fir and our contractor cut it to the almost identical profile as the original stuff.

New trim:

img_3522

Old trim:

img_3523

Ignore the dust. We have given up on keeping the dust away until the contractors are gone. As you can tell, the old baseboard trim is much tighter grained. It also has a coat of polyurethane on it, which the new stuff hasn’t received yet. These are also both stained different colors. The old trim picture is actually a non-original color. We tried to match the old trim with the original color.

Speaking of the dust, we also had our air ducts cleaned yesterday. I’m glad we didn’t dust prior to that as it put a layer of fine dust on top of *everything*. The guy came here around 2PM with their fancy air duct cleaning trailer. He didn’t leave until 6:30PM. Around 6, I asked him how many houses had ducts as bad as ours. He said he never saw one as bad. He had to unclog their machine 5 times. He showed me what was clogging it up. It was literally a 3″ thick layer of pure dust. Yum.

5 Comments

Moving In

House

Yesterday we were able to start moving furniture onto the main floor. I can’t begin to tell you how nice it was to finally do this. Shane came home over his lunch and moved the couch, buffet, dresser, and room dividers in from the porch. Brendan and I spent the majority of the day rearranging furniture and then playing on the couch. Brendan seemed to have a blast! He was laughing almost the entire day!  All that’s left now is to hang pictures and lights. We also need to finish setting up Shane’s office. Hopefully tonight we’ll finish.  It looks like a rainy today so we might be stuck inside. So I might start unpacking our boxes that are left from when we moved in upstairs.

img_3419

img_3418

While I was busy with furniture yesterday the kitchen counter tops were being installed. They look amazing and I couldn’t be happier with the kitchen. Now if we could only use it! Still no word on when the electrician and plumber will be here. Tomorrow our painter will be here to refinish the bay window and closet door.After that he’ll be painting the kitchen ceiling and back entry. He will also be doing touch ups through the house as a courtesy. After all of this all that’s left is the cleaning work and the rest of the wood work being installed. I did find out yesterday that the duct work and duct cleaning will be done next week at the earliest. After that they’ll come back in to clean carpets upstairs and steam clean the tile floors in the kitchen and downstairs bathroom. I have to admit I’m not happy that we’ll end up waiting again. We’re just so close to being done that I’m getting impatient.

img_3420

img_3421

5 Comments

Move-In Day: Monday

House

It has been a bit overdue, but I am excited none-the-less. Our floors are ALL DONE. Every last bit of them. No more flooring contractors over here anymore.

Since I have been bad with posting pictures recently, hopefully this one will make up for it.

Our living room:

img_3399

Dining room:

img_3400

Close-up:

img_3408

Hallway to the main floor bedroom:

img_3402

Main floor bedroom:

img_3403

Quality test – PASSED:

img_3411

We have to wait until Monday to move stuff in to allow it to fully “cure.” So, after 5 months of living upstairs, Monday is our “move-in” day. If I didn’t owe a good chunk of hours to my employer, I’d love to have taken the day off. For now, we are going to have to settle for cleaning all the dust off of the wood work and windows.

Some time today, our main contractor is supposed to be coming over to install the main kitchen counter top. That will allow the plumber and electrician to show up on Monday and get the kitchen finished. I should say that is the ideal scenario. I emailed the second tier “general contractor” to set up the plumber and electrician and haven’t heard from him yet. I’ll assume they’ll just show up sometime early next week.

What’s left?

  1. Kitchen counters (today the main piece is installed, early next week the island and sliver between the stove and fridge is installed)
  2. Sink, dishwasher, stove, and refrigerator hookup
  3. Baseboard trim in the kitchen
  4. Cabinet crown
  5. Kitchen ceiling paint
  6. Baseboard trim re-installation in the dining room by the door to the kitchen
  7. Dining room door to the kitchen trim
  8. Baseboard trim in the main floor bedroom on the wall opposite the kitchen (where we took out the added door)
  9. Main floor lights installation
  10. Upstairs hallway trim installation
  11. Upstairs bathroom trim installation
  12. Upstairs bathroom cabinet installation
  13. Duct cleaning

All-in-all, not too huge of a list. Most of the items are pretty simple. 80-90% of it should be done this coming week. I probably missed a few things, but if I did, they probably aren’t more than a 5 minute job.

We’re getting there!

3 Comments