Attach additional table on existing data mapping

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
navirius
Posts: 16
Joined: Sat 29 Jun 2013 11:50

Attach additional table on existing data mapping

Post by navirius » Mon 31 Aug 2015 07:42

I have database, and mapping it using linqconnect (using designer), I build generated code (data and datacontext) into one assembly, let say BaseDataContext.dll

later my db have additional table, but I dont want rebuild BaseDataContext.dll, I want to map additional table, but delete generated datacontext, then I want attach it to BaseDataContext.dll as different assembly, let say, AdditionalTable.dll

I know I must have function like below on my datacontext, for my datatable

Code: Select all

        internal Devart.Data.Linq.Table<TableClassData> TableClassData
        {
            get
            {
                return this.GetTable<TableClassData>();
            }
        }
My goal is, Can I use same datacontext (that exist on BaseDataContext.dll) for AdditionalTable.dll? with DI/injection/reflection may be?

thanks

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attach additional table on existing data mapping

Post by MariiaI » Tue 01 Sep 2015 08:35

navirius wrote:My goal is, Can I use same datacontext (that exist on BaseDataContext.dll) for AdditionalTable.dll? with DI/injection/reflection may be?
It is possible to implement such scenario with the fluent mapping approach.
We are sending you a sample project, that demonstrates possible solution for your scenario, to the e-mail address you provided in your forum profile. Please check that the letter is not blocked by your mail filter.
Please tell us if this helps.

navirius
Posts: 16
Joined: Sat 29 Jun 2013 11:50

Re: Attach additional table on existing data mapping

Post by navirius » Wed 02 Sep 2015 04:08

I got the concept, I try it now, thanks for your help

Post Reply