Vs 2012 , EF 5 data source not showing my entities RRS feed

  • Question

  • Dear All,

    I’ve installed VS 2012 , created a WPF app , add to it Entity Model (EF5)

    I’ve added some entity to the model (customer , order , ..)

    When I opened the data source window - in order to drag and drop them to the window so I can create the data grid-  I could not find my entity sets

    I’ve tried to add data source manually :

    Add new data source -> Object -> my application namespace

    I found the classes created by EF Temple (customer, order) and the entity container that contain the entities sets, I’ve added all of them, the same result happens :

    When I drag them to the designer , a gird is added , but when I run the application the grid didn’t display any data.

    I’ve tried to solved this by assigning the DataContext of the grid to an instance of the entity set in code at run time:

    Var dc = New MyEntitiesContainer();

    CustomarsGrid.DataContect = dc.CustomarSet.Local ();

    Didn’t work ether.

    Why is this problem , is it cause the EF5 uses DbContex? and is there a better way to solve it ?

    Cause now , I can’t have a master details grid , automatically binged from the designer drag and drop .

    Friday, November 9, 2012 10:24 AM


  • i found the answer her 


    • Marked as answer by Hani Safa Friday, December 7, 2012 10:26 AM
    Friday, December 7, 2012 10:26 AM