Guest User

Untitled

a guest
Jul 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. var resource = new Resource() { url = tbUrl.Text };
  2. try
  3. {
  4. context.Resource.AddObject(resource);
  5. context.SaveChanges();
  6. }
  7. catch(UpdateException ex)
  8. {
  9. // how to know exactly which is why the error occurred
  10. }
  11. catch (Exception ex)
  12. {
  13.  
  14. throw;
  15. }
Add Comment
Please, Sign In to add comment