I am using Entity Framework with stored procedures to insert / update / delete objects.
The task I am doing is managing stocks using the FIFO / LIFO => methods that those inserts / updates / deletes perform several checks and may fail (sometimes they fail).
The problem is that I want to tell .NET what went wrong and why. How can i do this?
I am currently using something like this:
BEGIN
ROLLBACK TRAN
RAISERROR (N'There' not enough items in stock.', -- message
16, -- severity
1) -- state
END;
I always get an "MSDTC error" - "Source provider refused EnlistTransaction."
source
share