-
Notifications
You must be signed in to change notification settings - Fork 124
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
Bug: Querying by string field fails in VB .Net #767
Comments
My problem seems to be simmilar to the one described here : https://stackoverflow.com/questions/2413046/lambda-expressions-in-vb-net-what-am-i-doing-wrong I tried to use Equals: But it throw a not supported exception: System.NotSupportedException Is there a solution or should I consider that RepoDb won't work with VB .Net. |
The |
Apology, I am bit occupied recently, a preparation for the talk. Can you help me here. Do you have a very small Console application that could mimic this? A one that is written in VB.NET? |
If you as well can attached the SQL Script for Schema, that would be better. Just attached it here is zip file and I will give priority to it by tomorrow, then probably issue a beta if I find it really a bug. Thanks Note: Your problem is a very common case, which I pre-assumed well supported by RepoDB. Of course, I had not tested that in VB.NET yet. |
Thank you Mike To reproduce create a console app in VB then paste the following code in the Module1.vb file Module Module1
End Module Jacques |
Will get back to you probably EOW together with a new beta build. Is that okay with you? |
It is ok. I am in the process of testing RepoDB to replace Dapper in our internal apps. |
While the issue is being fixed, can you for now utilize the Query Object like below? Dim myInvoice = Connection.Query(Of Factures)(New QueryField("Country", "France")).FirstOrDefault |
Referencing the actual fix from here. Was tagged wrongly to the other issue. |
The fix is now available at v1.12.8-beta2. |
Problem is fixed with the beta |
Bug Description
The following line raise Object reference Not Set To an instance Of an Object.
Dim myInvoice = Connection.Query(Of Factures)(Function(f) f.Country = "France").First
This line is working ok:
Dim myInvoice = Connection.Query(Of Factures)(Function(f) f.Id_Facture = 13624).First
Exception Message:
Schema and Model:
CREATE TABLE [dbo].[Factures](
[Id_Facture] [int] NOT NULL,
[Country] varchar NULL,
CONSTRAINT [PK_Factures] PRIMARY KEY CLUSTERED
And also the model that corresponds the schema.
Library Version:
RepoDb v1.12.8 and RepoDb.SqlServer v1.1.3
The text was updated successfully, but these errors were encountered: