So I found a tutorial on how to generate a class for my database. I installed Mono for windows, I got DbLinq and Npgsql, but i’m having a slight problem understanding how to generate the class.
The tutorial says I should use this in mono
mono DbMetal.exe /conn:"server=localhost;user id=user;\
password=password; database=db" /provider=PostgreSQL \
/code:db.cs /pluralize
If I write that into Mono i get this message
Reading schema from DBML file '\'
DbMetal : Access to the Path '\' is denied
What path should be there? The tutorial doesn’t specify.
Here is the tutorial : http://romain.blogreen.org/blog/2009/07/linq-postgresql-and-mono/
What should I do to fix this?
Thanks in advance!
On Windows/.NET, you are supposed to use SqlMetal,
http://msdn.microsoft.com/en-us/library/bb386987.aspx
According to DbMetal’s page, it is an equivalent of SqlMetal,
http://code.google.com/p/dblinq2007/wiki/DbMetal
The article you followed was written from Mono/Linux, so it may not demonstrate what are the parameters you should use on Windows.