vb.net - Accessing members of the other half of a partial class -


i'm learning work partial classes in vb.net , vs2008. specifically, i'm trying extend linq sql class automatically created sqlmetal.

the automatically generated class looks this:

partial public class datacontext     inherits system.data.linq.datacontext   ...   <table(name:="dbo.concessions")>  _ partial public class concession   ...       <column(storage:="_country", dbtype:="char(2)")>  _    public property country() string           ...     end property   ...  end class 

in separate file, here's i'm trying do:

partial public class datacontext      partial public class concession          public function foo() string             return dosomeprocessing(me.country)         end function      end class  end class 

... blue jaggies under 'me.country' , message 'country' not member of 'datacontext.concession'. both halves of partial class in same namespace.

so how access properties of automatically-generated half of partial class, half of partial class?

unless vb.net generates different stuff in linq sql files c# classes of db tables aren't within datacontext class, beside it.

so have class mynamespace.datacontext.concession when other half of partial class realy mynamespace.concession


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -