Starcounter / Starcounter.Linq

MIT License
1 stars 4 forks source link

Support DELETE FROM statements #16

Closed miyconst closed 6 years ago

miyconst commented 6 years ago

It is very often required to execute DELETE FROM SQL statement, although it's possible to use typeof and nameof operators without major performance hit, it still would be nice to support those statements with LINQ.

Something like:

// Delete all objects from Person table.
Objects<Person>.Delete();

// Delete objects from Person table if Name equals to test.
Objects<Person>.Delete(x => x.Name == "test");
un-tone commented 6 years ago

Closing as done

miyconst commented 6 years ago

Does Delete method support the same filtering predicates as Where does?

un-tone commented 6 years ago

Yes. I added additional tests for this feature.