Invoke a db-function with Linq
Posted: 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.
[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.