<p>In our data access layer at work we have this standard implementation where the class is accessed through a singleton public property which looks something like this:</p>

<pre><code>public static CustomerController Instance
        {
            get 
            {
                lock(singletonLock)
                {
                    if( _instance == null )
                    {
                        _instance = new CustomerController();  
                    }
                    return _instance;
                }
            }
        }
</code></pre>

<p>now, I get what the code is doing, but I was wondering why you would do this over just creating an instance of the class each time it is used?</p>

EDIT: Oh whoops I didn't catch the "Data Access Layers" part. But I have an example of that too: If your multithreaded app funnels all of its' database calls through a singleton class, only one thread will ever access the database at once, avoiding race conditions.
If you have a logging mechanism in a multi-threaded application that you use to spit out all exceptions and just write info in (especially for services, or apps that are always running, printing out statuses whenever stuff happens), you will run into file-locking issues. I use a singleton logger class, so that only one thread ever will have access to the Logger, and the rest will wait until the Logger is free to write their line in the text file.
There are lots of cool reasons to use a singleton, but I was like you and had no idea what they were FOR until I ran into this issue with file access in a multithreaded app.