sql - WCF RIA Services getting the ID of inserted row -


i using wcf ria services. not using entities , direct sql's. in case stored procedures , complex types work. i've faced such problem: when use store procedure insert row,there no way automatically update id database. in case of using entity , direct sql goes well. here stored procedure:

begin     -- set nocount on added prevent result sets     -- interfering select statements.     insert product     (               [name]       ,[note]  )       values       (           @name,     @note          )             select scope_identity() id  end 

the way solve -is reload data againg after insert.i think not idea load data, when 1 row must updated.second approach write more code new id manually sql server, believe there must better approach.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -