Page 1 of 1

Invoke a db-function with Linq

Posted: Fri 11 Dec 2015 13:02
by Ozzian
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.

Re: Invoke a db-function with Linq

Posted: Thu 17 Dec 2015 13:44
by Shalex
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.