Open cmeyertons opened 1 year ago
To me it seems that @mgravell already implemented this in PR #94.
/cc @mgravell @erwan-joly Is there any particular reason why this is not being merged?
I could use this also. @mgravell Is your branch safe for us to use, or will you be merging it soon? Thanks.
I compiled the async branch and it's working fine so far. I'm planning to use it in a new application that has an IAsyncEnumerable.
Dapper.AOT has a fully sync+async AOT implementation of the relevant API here
@mgravell Thanks for letting me know. I've used Dapper exclusively in my projects for the last 6 years, and use ObjectReader for bulk-copy. All of my projects are now on .NET 8. I knew about Dapper.AOT but have not checked on its progress in a while, and didn't know it had the DbDataReader feature. I'll switch to Dapper.AOT and test it.
Thanks. I had a difficult time with the TypeAccessorInterceptorGenerator "Not generating any files".
I'm using VS 17.8.6/.NET SDK 8.0.101/Dapper 2.1.37 (DateOnly)/Dapper.AOT 1.0.31
It's a class library. I stripped it down to nothing but 1 model class, and 1 class that had 1 method which called TypeAccessor.CreateDataReader and had [module: DapperAOT]. It still wouldn't generate the accessor. Hovering the mouse over CreateDataReader showed that it knew the type for the accessor: TypeAccessor<MyModel>
. Setting build output to diagnostic mode didn't show any reason/clue.
After fiddling with it for hours, closing/re-starting VS numerous times, it finally generated. I never determined why it wouldn't before. It would be good if there was a way to know why. I bulk-loaded 2 models to 2 tables, all good.
I too could use inherited class support as mentioned in: https://github.com/DapperLib/DapperAOT/issues/93 I see it's merged, so I'll just wait for the release.
Any plans for supporting an AsyncEnumerable you can send to SqlBulkCopy.WriteToServerAsync?
Are you accepting contributions? Would be more than happy to help out.
Generally thinking,