I am a little stuck at the moment trying to delete all the records from a table using this approach:
new Delete<Contact>().Execute();
This statement fails with a NullReferenceException
in BuildDeleteStatement
method at line:
sb.Append(query.FromTables[0].QualifiedName);
because, although FromTables has one entry, it is set to null. I also tried this but it didn't worked either:
var provider = ProviderFactory.GetProvider("MonitorData");
new Delete<Contact>(provider).Execute();
What am I doing wrong? Please help. Thanks.
PS: I am using ActiveRecord with SS v3.0.0.3.