Hi , wondering if anyone has any ideas to this within my class mapping. I think the answer maybe in my db structure.
Anyway, all thoughts very much appreciated.
Invalid association mapping for member 'Asset.DesignImages'. 'DesignImage' is not an entity
I've notice VS studio is giving me warnings:
Warning 1 Value for property "Discriminator Property" cannot be empty. 0 0
Warning 2 Value for property "Inheritance Default" cannot be empty. 0 0
My DataBase
Asset
DesignText (foreignkey to asset.id )
DesignImage (foreignkey to asset.id )
Maybe i'm gettng nulls???
var query =
from d in db.Designs
from a in db.Assets
select new ProductViewHelper()
{
theDesign = new Design(){DesignId = d.Id, Title = d.Title, DateField = DateTime.Now, PreviewImage = d.PreviewImage},
theAsset = new Asset(){AssetId = a.Id, DesignId = a.DesignId, Date = a.Date},
DesignTexts = (from x in a.DesignTexts select new DesignText()
{ DesignTextId = x.Id, Text = x.Text}).ToList(),
DesignImages = (from y in a.DesignImages select new DesignImage()
{Id = y.Id}).ToList()
};
foreach (var p in query)
{
Response.Write(p.theAsset.id);
}