none
Cannot access tables entities after update to EF 6.0 RRS feed

  • Question

  • Dear all,

    I was previously using EF 5.0 package on my ADO.net datamodel where I create the model from an sql server database

    From that point I was able to access my entities as follow :

     using (var db = new Data_Model.ConfigEntities(connnectionString))
                {
                    var pics = (from p in db.StorePhotoes where p.StoreID == StoreID select p).ToList();

    After upgrading to 6.0, my tables entities are not anymore accessible from the db object.

    any idea ?

    Tuesday, June 17, 2014 4:32 PM

Answers

  • Hello,

    >>After upgrading to 6.0, my tables entities are not anymore accessible from the db object.

    As far as I know, the team changed the below three namespaces since Entity Framework 6.0:

    System.Data.EntityException => System.Data.Entity.Core.EntityException
    
    System.Data.Objects.ObjectContext => System.Data.Entity.Core.Objects.ObjectContext
    
    System.Data.Objects.DataClasses.RelationshipManager => System.Data.Entity.Core.Objects.DataClasses.RelationshipManager
    

    And there is an article which describes how to upgrade to Entity Framework 6 step by step:

    http://msdn.microsoft.com/en-us/data/upgradeef6.aspx

    You can follow it and if this does not work for you, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Fred BaoModerator Wednesday, June 18, 2014 5:38 AM
    • Marked as answer by wakefun Thursday, June 19, 2014 11:21 AM
    Wednesday, June 18, 2014 5:38 AM
    Moderator