mgravell / fast-member

Automatically exported from code.google.com/p/fast-member
Apache License 2.0
1.02k stars 137 forks source link

SqlGeography support for ObjectReader? #62

Open tippmar opened 6 years ago

tippmar commented 6 years ago

I'm trying to use ObjectReader to facilitate SQL bulk copy but it doesn't seem to support SqlGeography data types. Not unexpected, I guess, but I'm wondering if it's possible to add support for SqlGeography?

mgravell commented 6 years ago

what happens currently?

On Wed, 29 Aug 2018 at 21:06, tippmar notifications@github.com wrote:

I'm trying to use ObjectReader to facilitate SQL bulk copy but it doesn't seem to support SqlGeography data types. Not unexpected, I guess, but I'm wondering if it's possible to add support for SqlGeography?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mgravell/fast-member/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsOFTu01ov6BtGw9NlCIL66i1El8Eks5uVvRIgaJpZM4WSPQ8 .

-- Regards,

Marc

tippmar commented 6 years ago

Well, after some more investigation, it seems my problem may not be related to ObjectReader specifically. It's a convoluted sequence involving interfaces, auto-generated proxy classes (via AutoMapper) and ObjectReader and BulkCopy all in combination. When I create a simple test, passing a list of concrete class instances, ObjectReader and BulkCopy work just fine. I'll keep digging and reopen if it seems necessary.

tippmar commented 6 years ago

A tad more Googling and I turned up this issue https://github.com/mgravell/fast-member/issues/35 and the related SO question https://stackoverflow.com/questions/41241131/fastmember-objectreader-doesnt-work-with-inherited-interfaces - that's the error I was getting. The SO question points to a code change that fixed the problem; I don't know if that change is suitable for integration into FastMember or not.