public void CleanUp() { using (var connection = _connectionFactory.CreateConnection()) { Spry.Delete().From("CustomerAddress").Execute(connection); Spry.Delete().From("Customer").Execute(connection); } }
public bool Delete(int customerId) { using (var connection = _connectionFactory.CreateConnection()) { var rowsDeleted = Spry.Delete <Customer>() .From(CUSTOMER_TABLE) .Where(_ => customerId).EqualTo(customerId) .Execute(connection); return(rowsDeleted == 1); } }