Skip to content

.Net 4, VS 2010, Entity Framework & mysql

July 23, 2010
by Christian

An update to this Stackoverflow question and to these posts.

To use the Entity Framework with Mysql on VS2010 you need to download the mysql .net connector.

Download 6.3.2 (beta) and install!

Too easy!

Developer Notes

July 14, 2010
tags: ,
by Christian
A few good references I’ve found over the past few days:

Low carb update

July 12, 2010
by Christian

It’s been a while since I last posted on the whole low carb / weight loss thing.

So here’s my 6 months review:

  • It works!
  • Weight loss to date is 12.5kg / 27 pounds
  • My cholesterol is sky high! (7.7)
  • My waist measurement is 104cm (<94cm is optimal)

Mentally my outlook has drastically changed.  At my age (36) and height (6’2″) I should be aiming for about 90kg.  Never before have I felt so confident that I will hit that.

Physically I have so much more energy.  Not in the “I’m going to go to the gym for the 9th time this week”.  It is more in the little things.  For example, I used to leave the dirty dishes in the sink and clean them the next day.  Now I see it has something that I can do in 5 minutes.

The only downside I’ve found is sugar.  I’ve been following Season 2 of Masterchef.  Some of the deserts look fantastic!  But from a weight loss point of view they are very expensive!

Take for example a Neenish Tart.  I would often have one of these with a coffee (~ 1 per week).  Now I know they aren’t good for you and that I shouldn’t have them, but just how bad are they?

(I’m not going to promote one low carb vs another.  I had great results with Michael Eades’, your results may vary).  The Wikipedia article couldn’t clearly define what is and isn’t low carbs.  So for arguments sake, lets say you are eating 20 – 30 grams per day.

What is in a Neenish Tart?

Nutrition Facts
Serving Size 1 batch 768g
Calories 3187
Calories from Fat 1368 (42%)
Amount Per Serving %DV
Total Fat 152.0g 233%
Saturated Fat 93.5g 467%
Monounsaturated Fat 39.8g
Polyunsaturated Fat 7.1g
Trans Fat 0.0g
Cholesterol 603mg 201%
Sodium 1807mg 75%
Potassium 676mg 19%
Total Carbohydrate 427.9g 142%
Dietary Fiber 6.3g 25%
Sugars 250.7g
Protein 37.3g 74%
how is this calculated?

In my experience, going off the rails like this isn’t the end of the world, but it can be a setback.

What’s your experience been like?

Where is Matt?

July 7, 2010
tags:
by Christian

Thanks! Thanks! Thanks!

July 7, 2010
by Christian

If you have done any sort of self development, there is often the recurring theme of gratitude  (see The Secret, Tony Robbins or John Demartini).

First time I heard the concept I dismissed it and belittled its importance.  But watching “What the Bleep” and particularly the Love Crystals changed my mind.

I don’t want to get all Yoda on you, either you have an open mind or you don’t.  I was skeptical, but have an open mind.  If you feel that that isn’t you then perhaps you should stop reading.

So have a look at the site http://thxthxthx.com by Leah Dieterich.  Basically she writes a daily “thank you” to whatever is going on in her life.

I know it’s a little ironic, but I can’t remember for the life of me who recommend I read it.  If it was you, thank you!

Rock on!

Visiting Sydney with Type 1 Diabetes

May 22, 2010

Recently on Hansleminutes, Scott Hanselman gives a great insight into living with Type I diabetes.

He is also coming to Sydney to present at Web Camps.

I really like his style.  While he is pro Microsoft, Scott has a good way of seperating himself from the drama.

Anyway, in his podcast he discusses the difficulty of going out for dinner when he is a strange town.

So Scott, to make your visit to Sydney, or if you find yourself in Sydney and with Diabetes here is what you should do:

  • This year, Web Camps will be at The Powerhouse museum which is in Ultimo,
  • It is an easy 10 minute walk, South East from the Sydney CBD.  (You could catch the Mono Rail or Light Rail but it is tacky and only tourist use it.)
  • That part of sydney is near the Uni and lots of Youth Hostels.  So Subway is going to be open at all hours.  (I’ve seen Subway at George St at 1:00am).

I’ve mapped all the Subway Restaurants in the area.  (More information is on the Subway website)

Enjoy!

Setting up Mercurial server in IIS7

May 13, 2010
by Christian

A short article on how to Setting up Mercurial server in IIS7

Then, follow these steps to install a self signed ssl certificate.

I was surprised how easy it is.  It worked for me!

Enjoy!

VS 2010, Mysql, Entity Framework and Setup wizard ended prematurely because of an error

May 7, 2010
by Christian

UPDATE: If you found this from this Stackoverflow question, could you help me out?  If you liked my answer, vote it up, if you don’t then post a comment why.  There are other higher voted answers that are wrong!  Thanks.

Below are the steps required to get the Entity Framework on VS 2010 to talk to MYSQL.

First step is to install the .net Connector.  I had to use v6.3.1 (alpha).

I tried this with 6.1.3, 6.1.4, 6.2.4 or 6.3.0 but none of them worked.  (For some reason they kept ignoring vs 2010)

Still, 6.3.1 gave me the message:  ”Setup wizard ended prematurely because of an error” message and it quit.

The workaround is to rename your config folder C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Config to Configxxx fixed this.  See this link for more information

Happy days!

[UPDATE] 6.2.3 is now under general release.  This still doesn’t work for VS2010.  As @Marcus mentions below, 6.3.2 is in beta and I can confirm this does work!  (It also doesn’t have “Setup wizard ended” error.)

Getting VS 2008 & mysql to play nicely!

May 3, 2010
by Christian

I love linq!

But getting mysql to place nicely isn’t so straight forward.   To get mysql running on .net 3.5 or 4.0 I had to do the following:

1.  Install the mysql .net connector
2.  Add the MySQL Data Provider line in the DbProviderFactories to your machine.config file:

<system.data>
    <DbProviderFactories>
        <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
    </DbProviderFactories>
</system.data>

(see here for more information)

3.  Restart Visual Studio
4.  Add your models and go nuts!

This Stack Overflow question helped

Good luck!

Telling a story…

March 25, 2010
by Christian

In a recent post, Seth Godin wrote

Here’s a $20 bottle of soap. Functionally identical to a $3 bottle, so what’s the $17 for?

He then lists several reasons why someone would pay an extra $17.

I’ve written before on the 6 Human Needs, but I thought it was worth repeating. The quick version:

Every basic human need can be boiled down to one of six:
1. Certainty (I have a ham & cheese sandwich every day because that’s why I have for lunch)
2. Uncertainty – picking a fight, trying something new, a bored teenager wanting a new experience. It doesn’t matter if it is good or bad, so long as it is different
3. Significance – it makes me feel important / different / special
4. Connection / Love – Having a pet, flirting, talking to a stranger
5. Growth – if we don’t grow we die!
6. Contribution – giving back

Take for example an armed robbery. Uncertainty – Anything could happen! Significance – if I pull a gun on you I am the center of your attention. Certainty – I know I will feel significant if I pull a gun on you.

Using the Soap Bottle:  the hang tag, mineral botanic, Dead Sea Laboratories, bamboo and pansy, very dry skin, French + velvet!

These are all either Significance (if this is your first time) or Certainty (you know that it is worth the extra $17)

Interesting eh?!

How would this product need to change to meet your need for Growth (by using this you will learn…) or Connection?  THAT makes this world a better place ;)