-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello just trying to esatablish how to use this as there are no code examples #29
Comments
I can only get Command off dbconnection. I am using Microsoft.Data.SqlClient as it is all that will really work in linux aot |
And my using statements are And Dapper.Aot is installed in the project |
Hello, I'm just a normal user here. But I can give you what I did to make it work on my side. But before all theses steps, you should try to make your app work first without DapperAot. You app should compile already compile before any step to add aot support. |
I have tried addind [DapperAot] over the method but the only Query methods are inside the Command class Only the Command methods are extensions of DBConnection Query is not an option in the normal way you use Dapper, so my question is how do i use this? |
if you look at https://github.com/DapperLib/DapperAOT/blob/main/src/Dapper.AOT/, you will see there is no definition for |
This is normal. You need classic Dapper first. And each call to SqlMapper will be replaced by a source generated one. The Trimming post processing will do the cleanup. On my side I have both package referenced <PackageReference Include="Dapper" Version="2.0.143" />
<PackageReference Include="Dapper.AOT" Version="0.5.0-beta.49" /> |
Thank you!! Everything works now.
…On Fri, Aug 11, 2023 at 6:19 PM Rémy de Sérésin ***@***.***> wrote:
This normal. You need classic Dapper first. And each call to SqlMapper
will be replaced by a source generated one. The Trimming post processing
will do the cleanup.
On my side I have both package referenced
<PackageReference Include="Dapper" Version="2.0.143" />
<PackageReference Include="Dapper.AOT" Version="0.5.0-beta.49" />
—
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7DCFZFAW77E2WSXNFPPVDXU2VYZANCNFSM6AAAAAA3LNPQ2I>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry for lack of documentation; we'll get there, but that isn't our top priority just yet |
I have seen that the code is obviously not constructed the same as normal dapper
I have tried this with the [DapperAot] attribute over my model
var programs = new List();
but it returns nothing, there is no "Query method off of sql connection like normal Dapper. How doo i get this to work on just very basic simple terms. Can you please give a ver basic code example of getting DapperAot to work, there is nothing in the readme
The text was updated successfully, but these errors were encountered: