I started using fluent migration and started to wonder how to perform deletes or updates using where clauses.
As far as the simple things go, it's pretty straightforward. As per the Fluent Migration wiki (https://fluentmigrator.github.io/articles/fluent-interface.html#data-expressions), here is a simple delete with a where clause:
Delete.FromTable("Users").Row(new { FirstName = "John" });
// Resulting sql:
// delete from Users where FirstName = 'John';
Then you could expand this to be more specific, like this:
Delete.FromTable("Users").Row(new { FirstName = "John", LastName = "Smith" });
// Resulting sql:
// delete from Users where FirstName = 'John' and LastName = 'Smith';
My question is, how do I specify an OR expression? I would want my resulting sql to be like this:
delete from Users where FirstName = 'John' or LastName = 'Smith';
I can't find any examples online or in their wiki, even when looking at the interface directly.