Click here to Skip to main content
15,893,668 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to clear a bindingsource without deleting from database Pin
Gerry Schmitz31-May-19 5:53
mveGerry Schmitz31-May-19 5:53 
QuestionVisual Basic : Entity Framework update only one table in model from database Pin
desanti30-May-19 2:20
desanti30-May-19 2:20 
QuestionListView DrawItem() e.Bounds gives different Height when item is selected. SOLVED. Pin
mo149228-May-19 2:54
mo149228-May-19 2:54 
AnswerRe: ListView DrawItem() e.Bounds gives different Height when item is selected. Pin
Richard MacCutchan28-May-19 6:20
mveRichard MacCutchan28-May-19 6:20 
GeneralRe: ListView DrawItem() e.Bounds gives different Height when item is selected. Pin
mo149228-May-19 6:24
mo149228-May-19 6:24 
Questionvb.net and Excel ribbon Pin
JR21218-May-19 21:07
JR21218-May-19 21:07 
AnswerRe: vb.net and Excel ribbon Pin
JR21210-Jun-19 10:51
JR21210-Jun-19 10:51 
QuestionEntity Framework Select several levels of childs Pin
desanti16-May-19 6:39
desanti16-May-19 6:39 
I'm using entity Framework 6.
On my database I have these tables :
MasterTable ( Id , name)
        Child1 ( ID , name , vl1 , Master_ID)
        Child2 ( ID , name , vl2 , MasterID )
        Child3 (ID , name , vl3 , Master_ID )
           Child3Itm ( ID , name , Child3_ID)


For a given `MasterTable` item, I want to load with a single Query from database:

 - All `Child1` where `vl1 > 5`
 - All `Child2` where `vl2 > 6`
 - All `Child3` where `vl3 > 7`

And in each `Child3` to load all of the `Child3Itm` content.

I'm using this query:

Dim lst = (From t In context.MasterTable.Where(Function(t1) t1.id = 7)
                     Select New With {
                                       t,
                                       .chld1 = t.child1s.Where(Function(t21) t21.vl1 >5),
                                       .chld2 = t.child2s.Where(Function(t31) t31.vl2>6 ),
                                       .chld3 = t.child3s.Where(Function(t41) t41.vl3>7).Select(Function(t411) t411.Child3Itms)
                                      }).ToList

The problem is that no `Child3` are selected. All others are OK.
What can i do?

Thanks in advance!

modified 16-May-19 13:35pm.

AnswerRe: Entity Framework Select several levels of childs Pin
Richard Deeming16-May-19 8:47
mveRichard Deeming16-May-19 8:47 
GeneralRe: Entity Framework Select several levels of childs Pin
desanti16-May-19 8:55
desanti16-May-19 8:55 
GeneralRe: Entity Framework Select several levels of childs Pin
desanti17-May-19 0:38
desanti17-May-19 0:38 
GeneralRe: Entity Framework Select several levels of childs Pin
Dave Kreskowiak17-May-19 1:45
mveDave Kreskowiak17-May-19 1:45 
GeneralRe: Entity Framework Select several levels of childs Pin
desanti17-May-19 1:53
desanti17-May-19 1:53 
GeneralRe: Entity Framework Select several levels of childs Pin
Dave Kreskowiak17-May-19 2:08
mveDave Kreskowiak17-May-19 2:08 
QuestionMicrosoft VBScript runtime error '800a01f4' Variable is undefined: 'DirectoryEntry' Pin
Member 1436203315-May-19 20:38
Member 1436203315-May-19 20:38 
AnswerRe: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'DirectoryEntry' Pin
Richard MacCutchan15-May-19 21:29
mveRichard MacCutchan15-May-19 21:29 
AnswerRe: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'DirectoryEntry' Pin
Dave Kreskowiak16-May-19 1:52
mveDave Kreskowiak16-May-19 1:52 
AnswerRe: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'DirectoryEntry' Pin
Richard Deeming16-May-19 1:53
mveRichard Deeming16-May-19 1:53 
GeneralRe: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'DirectoryEntry' Pin
Member 1436203316-May-19 22:57
Member 1436203316-May-19 22:57 
QuestionTrouble with recover a date from a datetimepicker Pin
Member 1122046515-May-19 5:55
Member 1122046515-May-19 5:55 
AnswerRe: Trouble with recover a date from a datetimepicker Pin
Eddy Vluggen16-May-19 9:38
professionalEddy Vluggen16-May-19 9:38 
GeneralRe: Trouble with recover a date from a datetimepicker Pin
Member 1122046516-May-19 12:06
Member 1122046516-May-19 12:06 
GeneralRe: Trouble with recover a date from a datetimepicker Pin
Eddy Vluggen16-May-19 22:30
professionalEddy Vluggen16-May-19 22:30 
GeneralRe: Trouble with recover a date from a datetimepicker Pin
Member 1122046517-May-19 4:43
Member 1122046517-May-19 4:43 
GeneralRe: Trouble with recover a date from a datetimepicker Pin
Eddy Vluggen17-May-19 23:00
professionalEddy Vluggen17-May-19 23:00 

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.