Click here to Skip to main content
15,436,928 members
Home / Discussions / C#
   

C#

 
GeneralRe: Artificial Neural Network Pin
Member 95388302-Feb-14 0:50
MemberMember 95388302-Feb-14 0:50 
QuestionDiamond Program with few requirements Pin
balaramanN1-Feb-14 19:47
MemberbalaramanN1-Feb-14 19:47 
AnswerRe: Diamond Program with few requirements Pin
Mycroft Holmes1-Feb-14 20:20
professionalMycroft Holmes1-Feb-14 20:20 
AnswerRe: Diamond Program with few requirements Pin
Richard MacCutchan1-Feb-14 21:32
mveRichard MacCutchan1-Feb-14 21:32 
Questionproblem in crystal report Pin
Shuaib wasif khan1-Feb-14 10:31
MemberShuaib wasif khan1-Feb-14 10:31 
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 
I'm a freelance programmer, and one of the major bugbears with working by myself is that I have no-one to bounce ideas off, so my code becomes very personal, if that's the right word, and I sometimes wonder if I'm doing things the right way. For instance, when I interrogate my database using Linq to Entities I use the following code (to return an instance of the purchase class).

internal static Purchase ReturnPurchaseItem(int PiD)
{
RegulusEntities RG = new RegulusEntities();
Purchase purchase = (from PU in RG.Purchases
where PU.PurchaseID == PiD
select PU).FirstOrDefault();
return purchase;
}

I would be very grateful if you could critique my code and maybe suggest more efficient ways of returning an instance of a class, or using the entity framework for that matter.
(If I've got this in the wrong forum, please forgive me, and transfer me to the right one!).
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 
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 

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.