Search code examples
c#fluent-migrator

increment old value FluentMigrator


I'm updating value of column and trying the following code:

Update.Table("Table1").Set(new { Column1 = Column1 + 123 });

But there is an error 'Column1' doesn't exist in the current context

How can I fix that? Or maybe how can I rewrite this to get it working?


Solution

  • You could use

    Execute.Sql(@"UPDATE Table1 SET Column1 = Column1 + 123");