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].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.


Reply via email to