-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
area-queryarea-relational-mappingcomposite-issueA grouping of multiple related issues into one issueA grouping of multiple related issues into one issue
Milestone
Description
This would allow functions in the database to be used in LINQ queries. This includes:
- Collection-valued composable functions, such as TVFs in SQL Server (Ability to map a CLR method returning queryable to TVF #20051)
- Composable functions with table valued parameters (Feature Request: LINQ to table parameter #13239)
- Support queries with complex expressions in parameters (Add complex expression support for DbFunction parameters #20093)
- Scalar composable functions (addressed by Query: Add support for User Defined Scalar Functions #7368)
- Scalar collection composable functions (DbFunctions: self-bootstrapping functions #9810, Support scalar query roots #20363)
- User-defined aggregate functions (Allow DbFunction to return scalar value from aggregates #11850, Map DbFunction to aggregate #20052)
- Support defining user methods that get translated to LINQ in queries #31871
We could support a number of patterns for this:
- Map functions to CLR methods (addressed by DBFunctions - Add support for instance methods. #9755)
- Using fluent API
- Using an attribute
- Ad-hoc invocation of SQL fragment in LINQ queries
- Map entity types to functions without a stand-in method
- Support complex entity type to function mapping (Support flexible entity type to function mapping #19970)
- Map properties to functions, e.g. enable entities to have calculated properties that evaluate to calling a function with the entity key as the argument
- Map navigations to functions
Once database functions can be mapped to methods, we could accept those methods in other places besides LINQ queries, e.g. to specify default values, in set based updates (once we have the feature), etc.
bottomup, MyEidos, ctodd1, dimio5, ScottKaye and 14 more
Metadata
Metadata
Assignees
Labels
area-queryarea-relational-mappingcomposite-issueA grouping of multiple related issues into one issueA grouping of multiple related issues into one issue