none
Visibility Of DBContext RRS feed

  • Question

  • Hi

     

      I have a dbml file and i have added couple of tables.  it's in following namespace Portal.DatabaseLayer

    When  add a reference databaselayer dll to another project i'm don't see any method and properties under DataContext.  Is it due to visibility?

    If i add a class file under Portal.DatabaseLayer namespace then if i create a object for datacontext i'm able to see all the methods and properties.

     

    For ex : I'm able to see context.TableName in different namespace but not Context.TableName.SubmitChanges ()

    but in the assembly i'm able to see.

     

    If default behaviour is like this is it possible to change the access modifier?

     

     

    Wednesday, November 9, 2011 12:52 PM

Answers

  • oops sorry didn't add System.Data.Linq in that project that's the reason i didn't get those properites and methods.

     

    Sorry to shout too early

    Wednesday, November 9, 2011 1:00 PM
  • Hi

     

      I have a dbml file and i have added couple of tables.  it's in following namespace Portal.DatabaseLayer

    When  add a reference databaselayer dll to another project i'm don't see any method and properties under DataContext.  Is it due to visibility?

    If i add a class file under Portal.DatabaseLayer namespace then if i create a object for datacontext i'm able to see all the methods and properties.

     

    For ex : I'm able to see context.TableName in different namespace but not Context.TableName.SubmitChanges ()

    but in the assembly i'm able to see.

     

    If default behaviour is like this is it possible to change the access modifier?

     

     


    The project you refrence your .dll file need use .NET 3.0+  and using system.data.linq


    Best Regards,
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Thursday, November 10, 2011 2:26 AM

All replies

  • oops sorry didn't add System.Data.Linq in that project that's the reason i didn't get those properites and methods.

     

    Sorry to shout too early

    Wednesday, November 9, 2011 1:00 PM
  • Hi

     

      I have a dbml file and i have added couple of tables.  it's in following namespace Portal.DatabaseLayer

    When  add a reference databaselayer dll to another project i'm don't see any method and properties under DataContext.  Is it due to visibility?

    If i add a class file under Portal.DatabaseLayer namespace then if i create a object for datacontext i'm able to see all the methods and properties.

     

    For ex : I'm able to see context.TableName in different namespace but not Context.TableName.SubmitChanges ()

    but in the assembly i'm able to see.

     

    If default behaviour is like this is it possible to change the access modifier?

     

     


    The project you refrence your .dll file need use .NET 3.0+  and using system.data.linq


    Best Regards,
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Thursday, November 10, 2011 2:26 AM