Julie Lerman

I was attempting to map in an UpdateCustomer stored procedure in an EDM and noticed that the schema checking wants me to add Insert and Delete functions as well.

So that's an all or nothing scenario

Also, if I do use EntityTypeMapping to encapsulate the functions, do I need to then move the scalarProperties INSIDE of the EntityTypeMapping tags

It's interesting that there are a bunch of elements that intellisense feeds you before ScalarProperties. But if you start to add elements after ScalarProperties, the list is trimmed down.



Re: ADO.NET (Pre-release) Modification Mapping: Insert/Update/Delete All or Nothing?

Tim Mallalieu - MSFT

Hi Julie

Yes, right now this is an all-or-nothing approach. The scenario we were after was where the developer wanted to either use sprocs or functions they defined themselves in SSDL to handle all CUD operations for a given entityset.

>>> if I do use EntityTypeMapping to encapsulate the functions do I need to then move the scalarProperties INSIDE of the EntityTypeMapping tags

Yes you would need to define the scalar properties inline. Consider, however the other post that I responded to regarding query views. One nifty thing you can do is define a query view for hte entityset and the modification functions and then you do not need the scalar property mappings. There is a whole sea of cool mappings that you could do with such a strategy that vanilla mapping techniques would not work for.

Tim M