This is a screencast I did last summer (2007) wherein I walked through some of the neat features of Rails - specifically the things that inspired SubSonic.
|
About
SubSonic is a .net open source project developed by Rob Conery and a core team of developers including Eric Kemp, Scott Watermasysk, Jon Galloway, Phil Haack, and Gavin Joyce. The current stable release is version 2.0.3. Nightly builds are available in our SVN respository. Categories
Tags
Popular
|
Entries categorized 'Active Record' ↓All About RailsThursday, April 17 2008 - Active Record Active Record: Using CollectionsThursday, March 13 2008 - Active Record Strongly-typed collections allow a developer to iterate over a set of data in an intuitive way, utilizing each object's properties and methods rather than typing in strings or "guessing" at ordinal position as you would with a Reader. Loading A Collection There are many ways to load a collection - telling it to load itself, or pasing in a DataReader or DataTable. We've tried to make this as simple as we can for you, and here are some examples (all samples below use the Northwind database): //Self-loading Northwind . ProductCollection products = new Northwind . ProductCollection (). Load (); //using... TransactionsThursday, March 13 2008 - Active Record Switching connection strings and performing shared connection transactions about as seamless as possible. It also extends support to Oracle. To Change the Active Connection String (Not Necessarily with a Transaction) using (SharedDbConnectionScope scope = new SharedDbConnectionScope( " new connectionstring " )) { // do stuff using new connection string } // returns to default provider connection string To Perform a Transaction With a Shared Connection using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope()) using (TransactionScope ts = new TransactionScope... Using Active RecordThursday, March 13 2008 - Active Record SubSonic creates objects for your which reflect your database structure. This is generally called Object-Relational Mapping (OR/M) and while it's true that SubSonic is an OR/M tool of sorts, it does not go the way of normal OR/M tools. You don't have to abide by our rules, never use SPs, etc. You do what you do and we try to make it easier for you. Tables Every table in your database (or the ones you specify in the abp file) is created as an object by SubSonic, which inherets from the ActiveRecord base class. These objects allow you to push/pull data from your database pretty easily: Product p... |
|
| © 2008 SubSonicProject.com. Use of this site is subject to our Terms of Use. All rights reserved. Duplication of this site, in part or in whole, is prohibited without prior written consent. |
