EntityFramework.Functions library implements Entity Framework code first support for stored procedures (with single result type, multiple result types, output parameter), table-valued functions (returning entity type, complex type), scalar-valued functions (composable, non-composable), aggregate functions, built-in functions, niladic functions, and model defined functions.
If an entity returned by a TVF uses optimistic concurrency (such as rowversion) and has ConcurrencyMode Fixed enabled then migrations will fail.
The current code genates a ConcurrencyMode attribute in the storage model for the for the "row type" of the functions. However the ConcurrencyMode is not allowed in that location causing the EdmDiffer to fail
Remove the copying of the ConcurrencyMode data when creating the properties for the row.
Even if clone.ConcurrencyMode = property.ConcurrencyMode; is removed from the EdmPropertyExtensions.Clone it seems like the items are copied from parameter.TypeUsage when the new parameter is created but it may be possible to exclude the Facet in some way
If an entity returned by a TVF uses optimistic concurrency (such as rowversion) and has ConcurrencyMode Fixed enabled then migrations will fail.
The current code genates a ConcurrencyMode attribute in the storage model for the for the "row type" of the functions. However the ConcurrencyMode is not allowed in that location causing the EdmDiffer to fail
Example of generated Edmx with this problem.
Proposed fix:
Remove the copying of the ConcurrencyMode data when creating the properties for the row. Even if
clone.ConcurrencyMode = property.ConcurrencyMode;
is removed from the EdmPropertyExtensions.Clone it seems like the items are copied from parameter.TypeUsage when the new parameter is created but it may be possible to exclude the Facet in some way