Hi,
I have a question, I hope somebody can help me?
I used LLBLGen to generate a BusinessLayer where there is a class which has a property which is in facted mapped to a table in another database. So, my LLBLGen project has 2 catalogs, and there is one entity with a FK to a table in another database.
My question?
The connectionstrings of these 2 databases can change, depending on the context of the application, how do I set the connectionstring of the second database when fetching records / when committing changes?
We fetch our records like this:
using (var adapter = new DataAccessAdapter(Database.MDM_Master_Local_ConnectionString))
{
var metaData = new LinqMetaData(adapter);
var q = (from c in metaData.AssessmentFiles
where c.Id == aAssessmentFileId
select c)
.WithPath(assessmentFile => assessmentFile
.Prefetch<TextLabelsEntity>(c => c.SignAsTextLabel)
.Prefetch<AssessmentFileProgressEntity>(c => c.AssessmentFileProgress)
.Prefetch<AssessmentFilePicturesEntity>(c => c.AssessmentFilePictures)
.SubPath(assessmentfilepicture => assessmentfilepicture
** .Prefetch<PictureEntity>(c => c.Picture) **
The entity in bold is the entity which comes from another db, but how do I set the connectionstring if it should differ from the default (the one to where te catalog is linked)
The same question when committing changes to the db, we commit our changes using the UnitOfWork but we can set the connectionstring for the first database, but how for the second?
Thanks!