Hello, i am also using FireBird and AFAIK you need to regenerate the dbml using dbMetal, since the generated code differs from provider to provider.
if DataClasses1 is also generated using dbMetal, and have the same structure, there shouldn't be any problem with the queries, you only need to change the connectionString On Fri, Jan 22, 2010 at 1:12 AM, jbm417 <[email protected]> wrote: > I am converting a SqlServer application to use an embedded FireBird > db. The original app uses linq which I would like to continue using. > Have DbLinq in the VS 2008 c# based app but do not understand how to > create a datacontext. > > For example: > > the original app has: > > private DataClasses1DataContext db_b = new > DataClasses1DataContext(); > > where DataClasses1 is the dbml generated by SqlMetal or the > OR designer. > > and the query looks like: > > var barrelQuery = > (from x in db_b.geos // geos is defined in > the DataClasses1 dbml > select new > { ............. > > > In the new app, using DbLinq, I am able to write: > > bConn = new FbConnection(ConStr); > FirebirdDataContext fdb = new FirebirdDataContext(bConn); > > However, I cannot figure out where to go from here. > > Questions: > > 1. Can the DataClasses1 dbml be used or must I generate new dbml > using DbMetal? > Database structure, col names & types, are the same in both > SqlServer & Firebird. > > 2. If new dbml is required, will a simple datacontext change in the > query be sufficient? > > var barrelQuery = > (from x in fdb.geos > select new > { ............. > > Bottom line -- at the moment, I do not understand how > > FirebirdDataContext fdb = new FirebirdDataContext(bConn); > > provides any dbml association so that the query can find the geos > table info. > > TIA for any help, Joe > > > > -- > You received this message because you are subscribed to the Google Groups > "DbLinq" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<dblinq%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/dblinq?hl=en. > > > > -- You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/dblinq?hl=en.
