Jon's arguments are correct: there are some problems with overriding MS
DataContext anyway. Not all methods can be overriden, so we must use the
"new" keyword, and this this custom DataContext is used from the MS .NET
framework, we will never be sure that it uses fully our DataContext
implementation instead of its own or worse, a mix of both
implementations.Sorry for that, my third idea was a bad, whenever
we're on Mono or MS (I'm
on MS).

Pascal.

jabber/gtalk: [email protected]
msn: [email protected]



On Wed, Mar 25, 2009 at 18:10, Giacomo Tesio <[email protected]> wrote:

> Actually, I'm wondering if our DataContext could extend the Linq to SQL one
> even when used with a different dbms different from sql server.
>
> If so, the DbLinq.Data.Linq.DataContext could extend always
> System.Linq.Data.DataContext.
> Than the the referred DLL would make the difference.
>
>
> This would be important to allow the use of microsoft code, when DbLinq run
> in a microsof environment, while using the Mono code when not.
>
>
> Giacomo
>
>
>
>
> On Wed, Mar 25, 2009 at 2:15 PM, Jonathan Pryor <[email protected]> wrote:
>
>>  On Wed, 2009-03-25 at 13:36 +0100, Pascal Craponne wrote:
>>
>> We have two options:
>>
>>  - The mono guys already wrote the class, so we just need to adapt it (not
>> sure it is even necessary) and use it.
>>
>>
>> This should be viable, and it's already within DbLinq:
>> src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/XmlMappingSource.cs.
>>
>>  - Cry a bit and write the class.
>>
>>
>> Not necessary, as it's already written (though we may want to 'svn mv' it
>> to a more appropriate location).
>>
>>  And maybe a third option, by making our DataContext inheriting from
>> .NET's DataContext. But this will cause a lot of trouble to the Mono
>> implementation. Can someone confirm?
>>
>>
>> I don't know if this would cause trouble, but it would cause *lots* of
>> warnings (due to shadowing inherited members, e.g. the non-virtual
>> DataContext.GetChangeSet() method), which would require lots of #if code
>> to handle...on *every* public DataContext member.  Yech.
>>
>> For Mono, we'd further need to make the base type conditional, leading to
>> even more #if in the code base (something I'd prefer to *decrease*, not
>> increase).
>>
>> So I'm not fond of this third option...
>>
>> - Jon
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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