public void Delete()
{
using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
carrot_RootContentSnippet s = CompiledQueries.cqGetSnippetDataTbl(_db, this.SiteID, this.Root_ContentSnippetID);
if (s != null) {
IQueryable<carrot_ContentSnippet> lst = (from m in _db.carrot_ContentSnippets
where m.Root_ContentSnippetID == s.Root_ContentSnippetID
select m);
_db.carrot_ContentSnippets.BatchDelete(lst);
_db.carrot_RootContentSnippets.DeleteOnSubmit(s);
_db.SubmitChanges();
}
}
}