Note that there are some explanatory texts on larger screens.

plurals
  1. USGabriel Vonlanten C. Lopes
    primarykey
    data
    text
    plurals
    1. COYou are missing the point. There is a Exception Framework implemented this framework that translates the exceptions to use friandly messages, this is why we throw the inner excpetion in here. Remeber we are making a wrapper for EF so this works under this context, the Wrapper takes care of the exceptions and throws. This would not be good in other contexts, but under this context this it correct. Be aware of the context, the throw here is just changing the mains message, the whole excpetion is there (no informationis lost), is just a matter of handlig the MESSAGE of the Excpetion.
      singulars
    2. COTo be honest, is kind of hard to help you with such an specific issue, if you could replicate this in simpler code and then edit you questino with the Designer code of you sample we can replicate and then really inderstand the issue, that for me is still unclear. Im jus trying to help :)
      singulars
    3. COThe question was about general use, so keep im mind that this is just one sample to help to explain. This is not the point of the question. The point of the try catch is to be able to show the inner exception that is raised instead of a more generic error. Also using Set<TEntity>().Add(entity) would work in this case, but there are some point where we cannot use the generic version (e.g when you have inheritance and have to use the .TypeOf<>)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload