Web Extensibility Download Part 1 - Service Realisation


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public void CreateExpense(ExpenseContract request)
  2. {
  3. _coordinator.SaveExpense(request);
  4.  
  5. if (_coordinator.RuleActionResults.Count > 0)
  6. {
  7. ContractFault fault = new ContractFault();
  8.  
  9. fault.Errors.AddRange(_coordinator.RuleActionResults);
  10.  
  11. throw new FaultException<ContractFault>(fault, "Create Expense Failed");
  12. }
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.