Giter Club home page Giter Club logo

Comments (10)

sdanyliv avatar sdanyliv commented on June 10, 2024 1

I think here is collision with linq2db's IsNullOrEmpty function. We already have this extension function but not mapped to SQL https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/Common/Tools.cs#L42

from linq2db.linqpad.

MaceWindu avatar MaceWindu commented on June 10, 2024 1

Tried it with linqpad 5.40.0 - still works for me.
Only possible fail point I can see now - you load diffrerent version of linq2db for My Extensions compared to version, used by linqpad provider. Try to reload it using F4 in My extensions file (extension use linq2db v2.9.1, if you have latest version).

from linq2db.linqpad.

Falthazar avatar Falthazar commented on June 10, 2024 1

Well, yep that was it! My Extensions was using 2.9.1, but the connection was using 2.7.0. I updated the connection driver to 2.9.1 and now it works perfectly. Thank you so much! Can't believe I didn't check that before.

from linq2db.linqpad.

MaceWindu avatar MaceWindu commented on June 10, 2024

Not sure what's going on, but it sounds strange - this error means that your query compiled successfully (found extension properly) and then linq2db wasn't able to handle it.

I've tried your extension with My Extensions file and it worked fine for me.

from linq2db.linqpad.

MaceWindu avatar MaceWindu commented on June 10, 2024

Could you post your query code?

from linq2db.linqpad.

MaceWindu avatar MaceWindu commented on June 10, 2024

Also linqpad version. I use v4.59.0 free for testing.

from linq2db.linqpad.

Falthazar avatar Falthazar commented on June 10, 2024

LinqPad version 5.4
Here is the query:

Projects.Select(p => new { p.ProjectID, p.ProjectManager })
    .Where(p => !p.ProjectManager.IsNullOrEmpty())

I don't have a using for LinqToDb nor LinqToDb.Tools in either the query or the extension, so it wouldn't be a collision right?

For reference, this works of course:

Projects.Select(p => new { p.ProjectID, p.ProjectManager })
    .Where(p => !string.IsNullOrEmpty(p.ProjectManager))

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

Just for clarifying. Could you please rename method to IsNullOrEmptySql? If problem still exists we will dig here more deeply.

from linq2db.linqpad.

Falthazar avatar Falthazar commented on June 10, 2024

Renamed it, but still getting the same error :(.
Tried both IsNullOrEmptySql and IsNullOrEmptySqlasdfdsfasdfdsfa juuust in case.

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

I'm not so familiar with LINQPad.
How do you define extension method in script? Screenshot can be enough.
Also which type of Driver do you use? Dynamic or using existing model?

from linq2db.linqpad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.