I have 2 entities products and images. Not all images are product images, and images are a sub class of a file below are my entities. I need to find all of the images that are not associated to a product. I'm new to retrieval of entities and have tried numerous approaches. Any ideas or links would be greatly appreciated.
public class File
{
#region Feilds
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual Enumerations.File.FileType Type { get; set; }
public virtual string Extension { get; set; }
public virtual string Path { get; set; }
public virtual DateTime DateCreated { get; set; }
public virtual DateTime DateModified { get; set; }
#endregion
}
public class Image : File
{
#region Fields
public virtual string ImageName { get; set; }
public virtual string Description { get; set; }
public virtual bool Active { get; set; }
public virtual DateTime DateTaken { get; set; }
#endregion
}
public class Product
{
#region Properties
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual decimal Price { get; set; }
public virtual decimal Weight { get; set; }
public virtual bool IsDigital { get; set; }
public virtual DateTime DateCreated { get; set; }
public virtual IList<Category> ProductCategories { get; set; }
public virtual IList<ProductAttribute> ProductAttributes { get; set; }
public virtual IList<Image> ProductImages { get; set; }
#endregion
}