SubSonic 3.0 ActiveRecord Tutorial

I wanted to demonstrate the complete and utter power of SubSonic Activerecord’s toolset. Pretty much, its an easy to use querying engine which automatically creates objects that you can use within your ASP.NET project. You can use LINQ querying if you like, or you can use the SubSonic preferred way as demonstrated below;

Want to bind a gridview?

var categories = category.All();
gvList.DataSource = categories;
gvList.DataBind();

Boom. Done.

<pre lang="csharp" line="1">
int iLineID = 1;
category delCat = category.SingleOrDefault(x => x.id == iLineID);
delCat.Delete();

Too easy right?

What about adding a new record?

category newCat = new category();
newCat.name = "Dummy category name";
newCat.Add();

How easy is that? Go grab SubSonic now!

No related posts.

Have a computer problem? Ask in our SUPPORT forum!

Receive Discounted Software

No bull. Want cheap discounts for common software products?
  • AntiVirus
  • Video editing tools
  • Web development tools
  • Registry Cleaners
  • Computer speed boosters!
Our editors get these products sent to us WEEKLY for review.

WE WANT TO PASS THESE DISCOUNTS ON TO YOU! (We honestly don't need them)

So whack your email in the box below and when we receive stuff we'll forward it to you! Its that simple.


Leave a Reply