I also am trying to work out how to invoke a sproc via the ObjectContext which just does a SELECT, and can't figure that out. Is there a way?
The reason I want to do this is to invoke a sproc which returns the result from a call to GetNextID on an oracle sequence, to use to populate a primary key property on a new object prior to calling save on the context.
And the reason I want to do that is because our DBA is nervous about us using triggers on inserts to populate primary keys on the table.
I was expecting to be able to write code like this:
Code: Select all
using(MyObjectContext ctx = new MyObjectContext())
long ID = ctx.GetNextID();