Exemplo n.º 1
0
        public static NeptunePage GetNeptunePageByPageType(NeptunePageType neptunePageType)
        {
            var neptunePage = HttpRequestStorage.DatabaseEntities.NeptunePages.SingleOrDefault(x => x.NeptunePageTypeID == neptunePageType.NeptunePageTypeID);

            Check.RequireNotNull(neptunePage);
            return(neptunePage);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(NeptunePageType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.NeptunePageTypeID == NeptunePageTypeID);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static NeptunePage CreateNewBlank(NeptunePageType neptunePageType)
 {
     return(new NeptunePage(neptunePageType));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public NeptunePage(NeptunePageType neptunePageType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.NeptunePageID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.NeptunePageTypeID = neptunePageType.NeptunePageTypeID;
 }