M
Mike Gleason jr Couturier
Hi,
I often write libraries that rely on a particular table in the application
database...
I used to put a key in the web.config to tell the library which table to
use.. (in the library's config section)
Now I did some LINQ and I'm hooked to it, and I'm writing a new library.
If I generate the code for a table, the datacontext contains a reference to
a database name in the mappings :
[System.Data.Linq.Mapping.DatabaseAttribute(Name="DATABASE_X")]
public partial class XxxxxxxDataContext : System.Data.Linq.DataContext
{ [...] }
Suppose my library always use the same table name, will the generated
datacontext in my library work with any client? (if the table structure
doesn't change and the client is responsible to pass the connection string
to my library)
In summary, I want to use LINQ in a library that rely on a table in a
database, which will be specified by the client application.
Is it possible?
Thanks!
I often write libraries that rely on a particular table in the application
database...
I used to put a key in the web.config to tell the library which table to
use.. (in the library's config section)
Now I did some LINQ and I'm hooked to it, and I'm writing a new library.
If I generate the code for a table, the datacontext contains a reference to
a database name in the mappings :
[System.Data.Linq.Mapping.DatabaseAttribute(Name="DATABASE_X")]
public partial class XxxxxxxDataContext : System.Data.Linq.DataContext
{ [...] }
Suppose my library always use the same table name, will the generated
datacontext in my library work with any client? (if the table structure
doesn't change and the client is responsible to pass the connection string
to my library)
In summary, I want to use LINQ in a library that rely on a table in a
database, which will be specified by the client application.
Is it possible?
Thanks!