Archives

Tagged ‘Repository‘

Setting up SubSonic3 Repository Mode with an Existing Database

Using SubSonic 3 respository mode has been a breath of fresh air for some of my projects. You can use simple POCOs (plain old CLR objects) and easily use inversion of control with your application. However, it can be a little confusing using repository mode with an existing database since SubSonic’s default schema naming may not conform to your database. By using SubSonic’s schema attributes, you can get your application up and running relatively easily; and if you have a ton of tables, I have a T4 template that generates basic domain classes against your database to get you started.

Read more →

Playing with SQLite, SubSonic3 and Repository Mode

Okay, lemme tell ya… I really, really like SubSonic right now.  I’m building a basic data integration application, and I wanted a simple way to store some basic tracking data locally. I didn’t want to build it into a Sql Server or create a super complicated data layer, so I decided to give SubSonic3’s Repository Mode with SQLite a try. SQLite gives me a simple, zero-config, file-based database solution for the app, and SubSonic provides a nice, clean way to push and pull data with it.

First of all, if you haven’t seen Conery’s five minute demo video on repository mode, you should. It’s very cool.  Once you watch it, you’ll get the basics of migration and understand the idea of building the object model first while using the database purely as a storage mechanism. In this case, I built my class, and I’m letting Migration handle all the schema generation for me. It will also create a new database file if one doesn’t already exist. That’s the idea right?

Read more →