/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public NeptunePageImage(NeptunePage neptunePage, FileResource fileResource) : this() { // Mark this as a new object by setting primary key with special value this.NeptunePageImageID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.NeptunePageID = neptunePage.NeptunePageID; this.NeptunePage = neptunePage; neptunePage.NeptunePageImages.Add(this); this.FileResourceID = fileResource.FileResourceID; this.FileResource = fileResource; fileResource.NeptunePageImages.Add(this); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static NeptunePageImage CreateNewBlank(NeptunePage neptunePage, FileResource fileResource) { return(new NeptunePageImage(neptunePage, fileResource)); }
public static void DeleteNeptunePage(this IQueryable <NeptunePage> neptunePages, NeptunePage neptunePageToDelete) { DeleteNeptunePage(neptunePages, new List <NeptunePage> { neptunePageToDelete }); }