Rob
Rob

Reputation: 875

OrientDB C# Update syntax

I am trying to recreate the OrientDB SQL query

UPDATE Car SET Name = 'Cadillac' WHERE Name = 'GM'

in the C# client OrientDB-NET.binary

What I have is

database
    .Update()
    .Class("Car")
    .Set("Name").Equals("Cadillac")
    .Where("Name").Equals("GM")
    .ToString();

but the SQL query this generates is

UPDATE Car WHERE  = 'GM'Name = 'Cadillac'

which is clearly not syntactically correct. What is the correct C# syntax for this query? Is this a bug in the C# client?

Upvotes: 1

Views: 154

Answers (1)

Rob
Rob

Reputation: 875

Figured it out:

database
    .Update()
    .Class("Car")
    .Set("Name", "Cadillac")
    .Where("Name").Equals("GM")
    .ToString();

Upvotes: 1

Related Questions