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?
[csharp]
var categories = category.All();
gvList.DataSource = categories;
gvList.DataBind();
[/csharp]
Boom. Done.
[csharp]
<pre lang="csharp" line="1">
int iLineID = 1;
category delCat = category.SingleOrDefault(x => x.id == iLineID);
delCat.Delete();
[/csharp]
Too easy right?
What about adding a new record?
[csharp]
category newCat = new category();
newCat.name = "Dummy category name";
newCat.Add();
[/csharp]
How easy is that? Go grab SubSonic now!
how can i update a row