Click here to Skip to main content
15,884,628 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is the correct way to do Business Validation on entities? Pin
phil.o12-Feb-20 2:56
professionalphil.o12-Feb-20 2:56 
GeneralRe: What is the correct way to do Business Validation on entities? Pin
Gerry Schmitz12-Feb-20 3:06
mveGerry Schmitz12-Feb-20 3:06 
AnswerRe: What is the correct way to do Business Validation on entities? Pin
Richard Deeming12-Feb-20 0:03
mveRichard Deeming12-Feb-20 0:03 
QuestionHow do create a class property that is a collection of the same class? Pin
Member 1474182311-Feb-20 8:04
Member 1474182311-Feb-20 8:04 
AnswerRe: How do create a class property that is a collection of the same class? Pin
Richard Deeming11-Feb-20 8:46
mveRichard Deeming11-Feb-20 8:46 
GeneralRe: How do create a class property that is a collection of the same class? Pin
Dave Kreskowiak11-Feb-20 9:02
mveDave Kreskowiak11-Feb-20 9:02 
GeneralRe: How do create a class property that is a collection of the same class? Pin
Member 1474182312-Feb-20 0:04
Member 1474182312-Feb-20 0:04 
GeneralRe: How do create a class property that is a collection of the same class? Pin
Richard Deeming12-Feb-20 0:15
mveRichard Deeming12-Feb-20 0:15 
For EF6:
Fluent API - Relationships - EF6 | Microsoft Docs[^]
C#
modelBuilder.Entity<Resource>()
    .HasOptional(r => r.Parent)
    .WithMany(r => r.Children)
    .HasForeignKey(r => r.ParentId);

For EF Core:
Relationships - EF Core | Microsoft Docs[^]
C#
modelBuilder.Entity<Resource>()
    .HasOne(r => r.Parent)
    .WithMany(r => r.Children)
    .HasForeignKey(r => r.ParentId);




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

AnswerRe: How do create a class property that is a collection of the same class? Pin
Gerry Schmitz11-Feb-20 14:14
mveGerry Schmitz11-Feb-20 14:14 
AnswerRe: How do create a class property that is a collection of the same class? Pin
Member 1474182312-Feb-20 0:51
Member 1474182312-Feb-20 0:51 
QuestionHow to Pass the textbox value into Textbox1 in Web Browser in WPF Pin
Hernany Bondoc11-Feb-20 6:27
Hernany Bondoc11-Feb-20 6:27 
Questioncontinuous PING application ? Pin
auting8210-Feb-20 9:27
auting8210-Feb-20 9:27 
AnswerRe: continuous PING application ? Pin
k505410-Feb-20 10:48
mvek505410-Feb-20 10:48 
GeneralRe: continuous PING application ? Pin
auting8211-Feb-20 9:31
auting8211-Feb-20 9:31 
GeneralRe: continuous PING application ? Pin
k505411-Feb-20 10:27
mvek505411-Feb-20 10:27 
GeneralRe: continuous PING application ? Pin
auting8211-Feb-20 10:48
auting8211-Feb-20 10:48 
AnswerRe: continuous PING application ? Pin
Gerry Schmitz10-Feb-20 13:56
mveGerry Schmitz10-Feb-20 13:56 
QuestionModifying multiple fields based on a condition Pin
Bice908-Feb-20 1:07
Bice908-Feb-20 1:07 
AnswerRe: Modifying multiple fields based on a condition Pin
Richard MacCutchan8-Feb-20 1:41
mveRichard MacCutchan8-Feb-20 1:41 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:10
Bice908-Feb-20 4:10 
GeneralRe: Modifying multiple fields based on a condition Pin
jsc4210-Feb-20 4:09
professionaljsc4210-Feb-20 4:09 
GeneralRe: Modifying multiple fields based on a condition Pin
Richard MacCutchan10-Feb-20 5:11
mveRichard MacCutchan10-Feb-20 5:11 
AnswerRe: Modifying multiple fields based on a condition Pin
OriginalGriff8-Feb-20 2:49
mveOriginalGriff8-Feb-20 2:49 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:12
Bice908-Feb-20 4:12 
AnswerRe: Modifying multiple fields based on a condition Pin
Eddy Vluggen8-Feb-20 2:51
professionalEddy Vluggen8-Feb-20 2:51 

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.