I am planning to use localdb for next project a
You mean you plan to run a database that is explicitly not made for running in production on production?
And I was thinking how to do automatic restore from backup. This required me to know if database is corrupted. And I can't find anything about this subject.
Read SQL documentation. Backusp, restores are all doe using standard SQL Commands. Totally easy to do that.
I want to make it very simple: detect if database is corrupt (how?)
DBC Checkdb command. Can take a lot of time, though, depending on the database.
perhaps I don't know something about sql express, localdb, linq-to-sql.
This can be solved by reading the documentation. I would for example never use localdb on anything production.
Read the documentation? It starts with the first line:
Microsoft SQL Server 2014 Express LocalDB is an execution mode of SQL Server Express targeted to program developers.