I'm quite new to working on Databases in general, and hope to get your guidance as to what went wrong. 

I have 4 tables at hand, currently set-up in this way:

![enter image description here](https://i.stack.imgur.com/OMVqc.jpg)

**Company** - Just an ordinary Company table with certain data in it

**Company\_GoodsPackaging** - A reference table for Company, where the information on WHAT kind of goods the company 'does' and what packaging type, for that good, is being done.

**GoodsType** - Basically an enum, values right now are:

> 
> 1 Commodity
> 
> 
> 2 Food / feed
> 
> 
> 3 Live Animals
> 
> 
> 4 Plants
> 
> 
> 5 Special cargo
> 
> 
> 6 Exceptional
> 
> 
> 

**PackagingType** - Also an enum, values:

> 
> 1 Parcel
> 
> 
> 2 Pallet
> 
> 
> 3 Container
> 
> 
> 4 Bulk
> 
> 
> 5 Oversized
> 
> 
> 

**CODE**

In my code-behind of my ASP.NET website I'm doing the following:

I iterate through all GoodsType values, and try to see whether CompanyX (a LINQ Company object) has this value in its table, and if so, what's the Packaging\_Type.Description of the value. 

The problem I'm having now, is that when I have my Company object, I don't seem to be able to extract its members.

```
var theSource = (from g in Data.GoodsTypes
select new
{
  gvGoodsType = g.Description,
  gvParcels = true,
  gvContainers = curCompany.Company_GoodsPackagings.GoodsType == g.Goods_Type &&
  curCompany.Company_GoodsPackagings.PackagingType1.Description == "Container"
}

```

The relationships are done, everything seems to be correct, but I can't just seem to be able to extract the GoodsType and PackagingType of a Company\_GoodsPackaging entry. I know it's a EntitySet.

Where is my DataBase design flawed/Code logic flawed? I have to say, I'm very new to working in DataBases alltogether. Any help/input would be much welcome.

Error I'm getting in VS is 

> 
> Error 26 'System.Data.Linq.EntitySet' does not contain a definition for 'GoodsType' and no extension method 'GoodsType' accepting a first argument of type 'System.Data.Linq.EntitySet' could be found (are you missing a using directive or an assembly reference?) \*\*\*\*\*\Account\MyAccountTransport.aspx.cs 33 8
> 
> 
>