When we merged the core EF functionality into EntityFramework.dll we did some refactorings. In particular, we renamed and moved the EntityFunctions class to align it with the DbContext API. However, in most other cases afterwards we have leaned towards not introducing unnecessary breaking changes.
This item is here just so we remember to discuss if we want the original API to still be available in EF6 to facilitate the migration of existing applications.
Comments: I have investigated this and it is easy. The functions can be added in both places with the EntityFunctions versions delegating to the DbFunctions versions. A small change is required in LINQ to Entities to deal with the EDM function members of the class--the Unicode methods. We do end up with two copies of each method, but neither copy has any significant implementation (they are really just stubs) so I think this is okay. For the attribute, EdmFunctionAttribute can be added back as a class that derives from DbFunctionAttribute. This requires no other changes to work. We should decide whether or not to put an Obsolete attribute on the Entity/Edm classes. The advantage of this is that people bringing old code over will be able to find the classes and they will even work, but they will get a compile time warning indicating that they should use the new versions. On the other hand, there is no real reason why we need to obsolete them, so we could just let people happily continue to use whichever ones they want.
This item is here just so we remember to discuss if we want the original API to still be available in EF6 to facilitate the migration of existing applications.
Comments: I have investigated this and it is easy. The functions can be added in both places with the EntityFunctions versions delegating to the DbFunctions versions. A small change is required in LINQ to Entities to deal with the EDM function members of the class--the Unicode methods. We do end up with two copies of each method, but neither copy has any significant implementation (they are really just stubs) so I think this is okay. For the attribute, EdmFunctionAttribute can be added back as a class that derives from DbFunctionAttribute. This requires no other changes to work. We should decide whether or not to put an Obsolete attribute on the Entity/Edm classes. The advantage of this is that people bringing old code over will be able to find the classes and they will even work, but they will get a compile time warning indicating that they should use the new versions. On the other hand, there is no real reason why we need to obsolete them, so we could just let people happily continue to use whichever ones they want.