Invoke a db-function with Linq

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Ozzian
Posts: 2
Joined: Wed 02 Dec 2015 10:29

Invoke a db-function with Linq

Post by Ozzian » Fri 11 Dec 2015 13:02

I want to use Linq to call a json function ( jsonb_extract_path_text ) from database.

[System.Data.Entity.DbFunction("[Tried_many_different_namespaces_with_no_luck", "jsonb_extract_path_text")]
public static string jsonb_extract_path_text(string json, string field)
{
//jsonb_extract_path_text(JsonColumn, field)
throw new NotImplementedException();
}

But i have troubles to get this working. The json datatype is not actually a string and i was wondering if that is the root cause?

I will post the actual error-message later.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Invoke a db-function with Linq

Post by Shalex » Thu 17 Dec 2015 13:44

Is the issue solved?

If not, please specify the exact text of the error and its full call stack. Also send us a small test project for reproducing.

JIC: a sample with DbFuction for SQLite is available at http://forums.devart.com/viewtopic.php?t=28777#p113649.

Post Reply