Skip to content

Cosmos: Support UDFs #15338

@TomasHubelbauer

Description

@TomasHubelbauer

I am wondering whether there is an attribute or a fluent API method that would allow me to tell EF Core to map an entity property to a result of a UDF invoked with that document as a parameter so that a context of the collection could be used to compute the value of the property from other documents in the collection.

Specifically, something like this:

SELECT {{ firstName: item.FirstName, lastName: item.LastName, test: udf.test(item) }} FROM AppDbContext item

As opposed to something like this which I assume the Cosmos provider already generates:

SELECT {{ firstName: item.FirstName, lastName: item.LastName, test: item.Test }} FROM AppDbContext item

Further technical details

EF Core version: Microsoft.EntityFrameworkCore.Cosmos 2.2.4
Database Provider: Microsoft.EntityFrameworkCore.Cosmos
Operating system: Windows 10
IDE: VS Code

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions