This is from my blog last october:
The Business Application Template for Silverlight comes with a login and register pages. It is very easy to connect these to a ASPNETDB.mdf.
Just add a LocalSqlServer connection string to your web.config file. For example, here is what I use to connect to Sql Server.
It’s almost too easy!
If you are using SqlExpress on your dev machine, it gets even easier. You don’t have to do anything. Just create a new Silverlight Business App and fire it up. Go to the log-on page and register. It will be slow, but in the background, your ASPNETDB was just created and attached, and you will be logged in. If you then look in the Web.config file, you won’t see a connection string anywhere, as the defaults are used for this piece of magic. Of course, a real world connection is going to need it’s own connection string like the above.
Greg