locked
Membership databse in entity framework RRS feed

  • Question

  • User1870461982 posted

    I am using membership databe in linq and it was working fine, now i am trying ado.net entity framework for the first time getting error

    query:

    var query5 = from a in database.aspnet_Users
                                join b in database.aspnet_UsersInRoles on a.UserId equals b.UserId
                                join c in database.aspnet_Roles on b.RoleId equals c.RoleId
                                where c.RoleName == "Director"
                                select a;


    Error message:
    does not contain a definition for 'aspnet_Memberships' and no extension method 'aspnet_Memberships'
    and does not contain a definition for 'aspnet_UsersInRoles'

    Entity type of this table not created aspnet_UsersInRoles for some reason, how can i create it manually?

    Monday, June 13, 2011 12:06 PM

Answers

  • User1870461982 posted

    not sure i think this is the solution to this problem

    http://stackoverflow.com/questions/1276543/asp-net-membership-table-aspnet-usersinroles-not-showing-up-in-enity-framework-d

    should i use this

    vw_aspnet_UsersInRoles

    instead of

    aspnet_UsersInRoles


    and this
    aspnet_Membership
    instead of
    aspnet_Memberships

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 13, 2011 12:57 PM

All replies

  • User1870461982 posted

    not sure i think this is the solution to this problem

    http://stackoverflow.com/questions/1276543/asp-net-membership-table-aspnet-usersinroles-not-showing-up-in-enity-framework-d

    should i use this

    vw_aspnet_UsersInRoles

    instead of

    aspnet_UsersInRoles


    and this
    aspnet_Membership
    instead of
    aspnet_Memberships

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 13, 2011 12:57 PM
  • User-330204900 posted

    Is this in relation to Asp.Net Dynamic Data? if not please post in the Security forum or the EF forum

    Monday, June 13, 2011 1:35 PM