Awsome Idea!!!

Mar 27, 2013 at 1:04 AM
Hi Matthieu,

This was a great idea, a little complex but I got it working in a couple of hours. The only thing I have to do is to add stored procedures and fix a few issues with service contracts. When you get a chance I would like to help expand the functionality.

So here is a fix that I'm offering as thanks. It fixes the issue of having the same named contract that's generated by enumeration. This gives the get by ID created version it's own name removing an nasty error. There are more errors but most can be figured out rather swiftly.

[Add Variable New]
var entityTypeNameByID = entitySet.ElementType == entity ? code.Escape(entitySet)+"ByID" : entityTypeName.EndsWith("y") ? entityTypeName.Substring(0, entityTypeName.Length - 1) + "ies" : entityTypeName + "s";

[Modify third contract type {Enumerated}]