Reputation: 3111
I have rather large business logic organised in SQL Server stored procedures in Azure.
I've tried Azure Mobile Service tables' scripts (the one for insert operation) in the hope to use it instead of SQL Server triggers. Surprisingly it wasn't fired when I called insert into from my stored procedures.
So my question is: provided I have an insert script for Azure Mobile Service table as well as stored procedures, will this script be fired if I insert something from a stored procedure. Or will it work only when something insert into table via client C# APIs? If it supposed work with stored procedures then apparently something went wrong and I would appreciate any ideas.
Upvotes: 0
Views: 232
Reputation: 10975
The scripts written for Windows Azure Mobile Services are outside of the database and are triggered when called from the API. The stored procedure is internal to the database and no link exists between the two. If you call a stored procedure on your database it will not cause a mobile service script to fire.
Windows Azure Mobile services has the SQL Database simply as the persistence store. You can think of it like a web service that sits in front of your data. Calling through the API will cause the logic to run, but directly calling the stored procedure by another means will not fire any scripts in mobile services.
Upvotes: 2