Click here to Skip to main content
15,893,923 members
Home / Discussions / C#
   

C#

 
AnswerGreat subject Pin
Luc Pattyn5-Sep-16 3:42
sitebuilderLuc Pattyn5-Sep-16 3:42 
GeneralRe: Great subject Pin
Pete O'Hanlon5-Sep-16 4:06
mvePete O'Hanlon5-Sep-16 4:06 
AnswerRe: C# Pin
#realJSOP6-Sep-16 1:36
mve#realJSOP6-Sep-16 1:36 
Questionjson attribute for ienumerable items Pin
Raghavendra.Kodimala2-Sep-16 23:05
professionalRaghavendra.Kodimala2-Sep-16 23:05 
AnswerRe: json attribute for ienumerable items Pin
Richard MacCutchan3-Sep-16 0:33
mveRichard MacCutchan3-Sep-16 0:33 
AnswerRe: json attribute for ienumerable items Pin
Richard Deeming5-Sep-16 2:11
mveRichard Deeming5-Sep-16 2:11 
Questionshows the insert and read only mode of form view main page dynamically doesn`t work in insert Pin
Member 126153702-Sep-16 20:28
Member 126153702-Sep-16 20:28 
SuggestionRe: shows the insert and read only mode of form view main page dynamically doesn`t work in insert Pin
Richard Deeming5-Sep-16 2:10
mveRichard Deeming5-Sep-16 2:10 
QuestionHow to Add Assembly Reference in VS 2012 Pin
Member 122888402-Sep-16 16:06
Member 122888402-Sep-16 16:06 
AnswerRe: How to Add Assembly Reference in VS 2012 Pin
Richard Andrew x642-Sep-16 18:10
professionalRichard Andrew x642-Sep-16 18:10 
GeneralMessage Closed Pin
2-Sep-16 19:31
Member 122888402-Sep-16 19:31 
GeneralRe: How to Add Assembly Reference in VS 2012 Pin
Richard Andrew x643-Sep-16 3:33
professionalRichard Andrew x643-Sep-16 3:33 
QuestionMessage Removed Pin
2-Sep-16 8:22
Tej_dev2-Sep-16 8:22 
QuestionSQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 Pin
Tej_dev2-Sep-16 8:02
Tej_dev2-Sep-16 8:02 
AnswerRe: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 Pin
NotPolitcallyCorrect2-Sep-16 8:15
NotPolitcallyCorrect2-Sep-16 8:15 
AnswerRe: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 Pin
Dave Kreskowiak2-Sep-16 9:17
mveDave Kreskowiak2-Sep-16 9:17 
GeneralRe: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 Pin
Tej_dev6-Sep-16 6:47
Tej_dev6-Sep-16 6:47 
GeneralRe: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 Pin
Dave Kreskowiak6-Sep-16 9:31
mveDave Kreskowiak6-Sep-16 9:31 
QuestionWhat kind of relation is created with virtual keyword in EF Pin
Tridip Bhattacharjee2-Sep-16 2:46
professionalTridip Bhattacharjee2-Sep-16 2:46 
I am new in EF. I mostly use ADO.Net to interact with DB. So learning EF code first.

Just see a below code. Post and blog class which has one-to-many relation I guess...........am I right?
C#
public class Blog 
{ 
    public int BlogId { get; set; } 
    public string Name { get; set; } 

    public virtual List<Post> Posts { get; set; } 
} 

public class Post 
{ 
    public int PostId { get; set; } 
    public string Title { get; set; } 
    public string Content { get; set; } 

    public int BlogId { get; set; } 
    public virtual Blog Blog { get; set; } 
} 


why blog class has one virtual property list type of Post?

And same way why post class has one virtual property type of Blog?

if we remove the virtual keyword only then what will happen?

how virtual keyword create relation?

why virtual keyword has been used in two class?

Please answer my all questions point wise in details.
tbhattacharjee

AnswerRe: What kind of relation is created with virtual keyword in EF Pin
Pete O'Hanlon2-Sep-16 3:10
mvePete O'Hanlon2-Sep-16 3:10 
QuestionOverride properties in derived classes - some have fixed value, some do not Pin
amaturi1-Sep-16 22:32
amaturi1-Sep-16 22:32 
AnswerRe: Override properties in derived classes - some have fixed value, some do not Pin
Pete O'Hanlon1-Sep-16 22:57
mvePete O'Hanlon1-Sep-16 22:57 
AnswerRe: Override properties in derived classes - some have fixed value, some do not PinPopular
OriginalGriff1-Sep-16 23:13
mveOriginalGriff1-Sep-16 23:13 
GeneralRe: Override properties in derived classes - some have fixed value, some do not Pin
BillWoodruff2-Sep-16 1:49
professionalBillWoodruff2-Sep-16 1:49 
GeneralRe: Override properties in derived classes - some have fixed value, some do not Pin
OriginalGriff2-Sep-16 3:57
mveOriginalGriff2-Sep-16 3:57 

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.