Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
13Activity
0 of .
Results for:
No results containing your search query
P. 1
Subsonic Tutorial

Subsonic Tutorial

Ratings: (0)|Views: 420 |Likes:
Published by Gautam
Found this on internet. Completely worthy to share
Found this on internet. Completely worthy to share

More info:

Published by: Gautam on Mar 02, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/02/2010

pdf

text

original

 
Scott Kuhl Getting Started with SubSonic 12/9/2006Page | 1
Getting Started with SubSonic
 
SubSonic is an open-source toolset, created by Rob Conery,as an attempt to put the fun back into programming and just get the job done. Inspired by Ruby on Rails,SubSonic takes a minimalist approach to coding and emphasizes convention over configuration. While it takes its inspirationfrom Ruby on Rails, it is not a port of it. (Check out MonoRail it that's what you're looking for.) Instead, SubSonic takes the best ideas of Ruby on Rails and adapts them into the already existingASP.NET framework. Currently SubSonic, version 1.05, implements two core features:
 ActiveRecord 
 
This design pattern in its simplest form is one class per database table, one object per database row.SubSonic includes a build-time code generator to implement this pattern that acts as an object-relational mapper eliminating the need to write SQL. It also includes a dynamic query tool and simplestore procedure support to extend the model when needed.
Scaffolding
 
Admin pages are a chore that scaffolding helps remove. Simply point a scaffold control at a table andyou get the standard grid view and detail view to find and update data in the underlying table. Whilenot meant to ever be shown to users, it makes a nice, quick and easy developer tool.
 
Scott Kuhl Getting Started with SubSonic 12/9/2006Page | 2Requirements ................................................................................................................................................ 4Setup ............................................................................................................................................................. 4Configuration ................................................................................................................................................ 4SubSonic Configuration Section ................................................................................................................ 4Data Provider ............................................................................................................................................ 4Database Connection String...................................................................................................................... 5Build Provider Configuration ..................................................................................................................... 5Build Provider Definition ........................................................................................................................... 5Summary ................................................................................................................................................... 6Trust Level ..................................................................................................................................................... 7Classes ........................................................................................................................................................... 7Extending the Model ............................................................................................................................. 7Constructors .......................................................................................................................................... 8Properties .................................................................................................................................................. 8Rules Enforcement ................................................................................................................................ 8Object Key ............................................................................................................................................. 8State ...................................................................................................................................................... 8Columns ................................................................................................................................................ 8Retrieving a Single Object ......................................................................................................................... 9FetchByID .............................................................................................................................................. 9Constructor ........................................................................................................................................... 9Loading and Saving State ...................................................................................................................... 9Retrieving Multiple Objects .................................................................................................................... 10FetchAll ............................................................................................................................................... 10FetchByParameter .............................................................................................................................. 10FetchByQuery ...................................................................................................................................... 10Find ...................................................................................................................................................... 10Querying .............................................................................................................................................. 11Updating the Database ........................................................................................................................... 11Insert and Update ............................................................................................................................... 11Deleting ............................................................................................................................................... 11Business Rules ......................................................................................................................................... 12
 
Scott Kuhl Getting Started with SubSonic 12/9/2006Page | 3Underlying Data ...................................................................................................................................... 12Collections ................................................................................................................................................... 13Loading a Collection ................................................................................................................................ 13Ordering a Collection .............................................................................................................................. 13Filtering a Collection ............................................................................................................................... 13Queries ........................................................................................................................................................ 13Running the Query .............................................................................................................................. 14Ordering .................................................................................................................................................. 14Filtering ................................................................................................................................................... 14Columns .............................................................................................................................................. 14Rows .................................................................................................................................................... 15Updating and Deleting ............................................................................................................................ 15Aggregate Functions ............................................................................................................................... 15Commands .............................................................................................................................................. 16Stored Procedures ...................................................................................................................................... 16Scaffolding ................................................................................................................................................... 16Code Generation Templates ....................................................................................................................... 17Conventions ................................................................................................................................................ 17Controllers............................................................................................................................................... 17Database ................................................................................................................................................. 17Sample Web ................................................................................................................................................ 18Starter Kits .................................................................................................................................................. 18SubSonic Starter Kit ................................................................................................................................ 18Commerce Starter Kit.............................................................................................................................. 19

Activity (13)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
ivdarl liked this
Saurabh Jain liked this
Jontri Pakpahan liked this
Lam Nguyen Mai liked this
Lam Nguyen Mai liked this
markimvini liked this
Nirmal Kumar liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->