SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Question DataContext Conflicting Class Names ?

    I have a dbml based off my database, and one of the exposed classes is User. Now, obviously that conflicts with the built in User membership object. As a matter of face, the only one that appears in the atuo-completion drop down is the membership based one.

    How do I instantiate an instance of the dbml version in VB please? I'm assuming there's a namespace involved, but I'm not sure which and I'm tired of browsing and digging through the popups. lol

  2. #2
    SitePoint Guru pufa's Avatar
    Join Date
    Oct 2004
    Location
    Portugal, Lisboa
    Posts
    947
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use fully qualified names (Namespace.Class) or Namespace alias (Using Alias = Namespace ... then in code ... Alias.Class)
    Ciao, Rui...

  3. #3
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    You know...I just have to sit and laugh at myself. Sometimes I am really intelligent. Other times I am totally brain dead. I should've never had to post this. =/

  4. #4
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Well, sometimes I can't figure something out until I ask about it here. About 20 seconds after I ask though the light goes on.

  5. #5
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NAWA-mark View Post
    Well, sometimes I can't figure something out until I ask about it here. About 20 seconds after I ask though the light goes on.
    LOL. Same here. That just how it goes I guess.


    @Serenarules you could also just go into the dbml designer and change the name of the Users table to Members or something. Then you will have no conflicts. Should make it a little simpler

  6. #6
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WHy not check out JetBrains Resharpers, it really helps with situations like this, and a whole load more!

  7. #7
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    I second that. I dnt know how i ever lived without Resharper


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •