Timeline for Using static management class to control db transactions through an EF6
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 14, 2014 at 0:07 | comment | added | ymg | I see your point now. | |
Apr 14, 2014 at 0:00 | comment | added | dreza | @Meldar oh, yes My comment was around did we need to use SingleOrDefault. Cause if the role is always going to exist using Single would be clearer in that we expect it to always be there. Sorry if I wasn't clear in my query. | |
Apr 13, 2014 at 23:58 | comment | added | ymg | I guess I didnt succeed in saying what I wanted to say, the code you provided is quite good compared to what I was using and will serve the purpose well. I was just answering your comment inside the code you provided about why I'm fetching the role object from the db that's all :) | |
Apr 13, 2014 at 23:54 | comment | added | dreza | @Meldar oh, and just for your reference. If you let the question sit un-accepted for a few days you are more likely to get a few other people commenting who might also have great ideas, thoughts or even better comments. Might help you out even more.... | |
Apr 13, 2014 at 23:53 | comment | added | dreza | @Meldar Sorry I don't quite understand what you mean? Is something I suggested not working (Which could very well be the case) | |
Apr 13, 2014 at 23:34 | comment | added | ymg |
about the pre-fetch of the role object, I have the following schema [Account]1--m[AccountRole]m--1[Role] . EF did not simply allow me to create my role object and submit it with the account object or that's at least what happened when I tried it, the record simply does not get inserted. I had to pre-fetch my role before hand.
|
|
Apr 13, 2014 at 23:21 | vote | accept | ymg | ||
Apr 13, 2014 at 23:21 | comment | added | ymg | Great points sir, thanks a lot for your help. | |
Apr 13, 2014 at 22:59 | history | answered | dreza | CC BY-SA 3.0 |