Click here to Skip to main content
15,435,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: problem in crystal report Pin
Mycroft Holmes1-Feb-14 20:19
professionalMycroft Holmes1-Feb-14 20:19 
AnswerRe: problem in crystal report Pin
John D. Sanders4-Feb-14 9:15
MemberJohn D. Sanders4-Feb-14 9:15 
QuestionBest practise for using EF Entities Pin
Shady George1-Feb-14 10:13
MemberShady George1-Feb-14 10:13 
AnswerRe: Best practise for using EF Entities Pin
Dave Kreskowiak1-Feb-14 13:07
mveDave Kreskowiak1-Feb-14 13:07 
GeneralMessage Closed Pin
2-Feb-14 9:51
Membercseder2-Feb-14 9:51 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak2-Feb-14 11:46
mveDave Kreskowiak2-Feb-14 11:46 
RantRe: Best practise for using EF Entities Pin
cseder2-Feb-14 15:19
Membercseder2-Feb-14 15:19 
GeneralRe: Best practise for using EF Entities Pin
Shady George2-Feb-14 15:50
MemberShady George2-Feb-14 15:50 
Thanks for the reasoned and well thought out answer Dave. In showing you only a tiny patch of my code, I actually missed out the whole structure that this little method sits in.

This method, as with all my other calls to EF sits in a service class written to handle all the calls to a particular table. for example, all the calls to the purchase table are made from the clsPurchaseHandler class, thus separating it from the UI.

Your answer is exactly what I wanted. as I explained I am a freelance programmer running my own little operation, and I haven't got the luxury of being able to discuss code with anyone, and there's always the niggle at the back of my mind that 'I know it works, but is it the most efficient'. Your code detailing the disposal of entities after use and the find method is invaluable.

As for my naming of the method "ReturnPurchaseItem", that's my usual practise, as that's what the method does, I take your point that it may sound vague, but I've got a lot of code out in the wild that uses this notation, so for now, I'll stick with it.


Thanks again Dave, much appreciated.

George
George

GeneralRe: Best practise for using EF Entities Pin
Shady George2-Feb-14 17:05
MemberShady George2-Feb-14 17:05 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak2-Feb-14 18:52
mveDave Kreskowiak2-Feb-14 18:52 
GeneralRe: Best practise for using EF Entities Pin
Shady George4-Feb-14 8:28
MemberShady George4-Feb-14 8:28 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak4-Feb-14 10:11
mveDave Kreskowiak4-Feb-14 10:11 
GeneralRe: Best practise for using EF Entities Pin
Shady George4-Feb-14 10:18
MemberShady George4-Feb-14 10:18 
GeneralRe: Best practise for using EF Entities Pin
Shady George5-Feb-14 10:07
MemberShady George5-Feb-14 10:07 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak5-Feb-14 10:49
mveDave Kreskowiak5-Feb-14 10:49 
GeneralRe: Best practise for using EF Entities Pin
Shady George5-Feb-14 10:59
MemberShady George5-Feb-14 10:59 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak5-Feb-14 15:17
mveDave Kreskowiak5-Feb-14 15:17 
GeneralRe: Best practise for using EF Entities Pin
Shady George6-Feb-14 9:38
MemberShady George6-Feb-14 9:38 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak6-Feb-14 9:53
mveDave Kreskowiak6-Feb-14 9:53 
GeneralRe: Best practise for using EF Entities Pin
Shady George6-Feb-14 10:17
MemberShady George6-Feb-14 10:17 
GeneralRe: Best practise for using EF Entities Pin
Shady George6-Feb-14 11:50
MemberShady George6-Feb-14 11:50 
GeneralRe: Best practise for using EF Entities Pin
Dave Kreskowiak6-Feb-14 12:14
mveDave Kreskowiak6-Feb-14 12:14 
AnswerRe: Best practise for using EF Entities Pin
cseder2-Feb-14 15:23
Membercseder2-Feb-14 15:23 
QuestionC# and databse connectivity issue urgent?? Pin
Member 105648501-Feb-14 2:58
MemberMember 105648501-Feb-14 2:58 
AnswerRe: C# and databse connectivity issue urgent?? Pin
OriginalGriff1-Feb-14 3:09
mveOriginalGriff1-Feb-14 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.