Subsonic Delete Example

Subsonic seems to be really all that for DAL (Data Access Layer). In this example I have a table named “DvdNote” that a struct was generated by the Subsonic SubCommander tool.

Example on how to perform a delete statement;

[code:c#]                    SubSonic.Query qryDelete = new SubSonic.Query(DvdNote.Schema);
qryDelete.QueryType = SubSonic.QueryType.Delete;
qryDelete.WHERE(DvdNote.Columns.DvdnotePkid, this.Identity);

qryDelete.Execute();[/code]

Syntax highlighting, ftw! Hurrah!

Leave a Reply