views:

27

answers:

0

Question
I'm using .NET 3.5 SP1 and EDM. Instead of using the EDM designer tools to map functions to stored procedures at design time (code generation), I'd like to map functions programmatically when the EDM container and entities are instantiated.

Reason
I literally have dozens of stored procedures in the data source to map by hand, but they all have a common naming pattern, so I would like to write a simple loop that maps them to their respective entities at runtime, before I start using the entity instances. This takes less effort on my part and allows me to add even more stored procedures in the future and have them mapped automatically.

I'm open to considering other options for my scenario, basically anything that's faster than doing it by hand.

related questions