This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
There appears to be no way to execute a scalar stored proc the way you can in Linq to SQL (the right-hand pane in the designer). It would be really useful to drag and drop sp's onto the design surface and have full method signatures generated for calling the procs directly from a unit of work... (no need for full entity definitions or identity maps - just map primitive input parameters and return types). eg: thisUnitOfWork.GetLatestCustomerID(ref customerID) I have found this to be a very useful feature... |
|
|
Although this is not supported in the designer, you can still do it in code using the IUnitOfWork.Calculate method, e.g.: ProcedureQuery query = new ProcedureQuery("GetLatestCustomerID"); or for returning values via parameters: ProcedureParameter cid = new ProcedureParameter("customerID", 0, ParameterDirection.Output, DbType.Int32, null); Obviously you can wrap this up in a nice encapsulated method to avoid polluting your app code. Adding this to the designer is on the roadmap but we don't have a timescale for it yet. If you've got a lot of scalar procedures then let us know and we'll see if we can bump it up the priority list. |
|