Accepted answer


Steps I followed:

  1. Downloaded the DBLinq 0.20 source code from this Link
  2. Built it.
  3. copied my database and System.Data.SQLite.dll file to src\DbMetal\obj\Debug folder
  4. Used the following codes to create dbml file from db and cs file from dbml file respectively

DbMetal /provider:Sqlite /conn "Data Source=File.db3" /dbml:File.dbml

DbMetal /code:File.cs File.dbml

The procedure is well illustrated in this link ->


You need to provide a /provider:PROVIDER option to DbMetal.exe so that it knows what kind of database you're using, otherwise it assumes you want Microsoft SQL Server.

Furthermore, you can only use the /dbml or /code options, not both at the same time.

Try this command instead:

DbMetal /provider:Sqlite /conn "Data Source=myDb.db3" /code:mycode.cs /namespace:myNS

If that doesn't work, please file a bug at:

Related Query

More Query from same tag