ferroariel
ferroariel

Reputation: 179

EF and MySQL table last update

I´m using Entity Framework to pull data from a MySQL database. I know I can get the last time a given table has been updated. How can I do this using EF?

Upvotes: 0

Views: 42

Answers (1)

JotaBe
JotaBe

Reputation: 39025

You can use Database.SqlQuery Method (String, Object[]) to run the query that returns the desired data.

The TElement parameter type must be

  • either a single type (like string) if the query returns a single value (1 row, 1 column)
  • a class that has column which the same names of the columns returned by the query (if the query returns several columns) You'd have to create this class yourself, if this is the case.

Upvotes: 1

Related Questions