/// <summary> /// Enum types are equal by primary key /// </summary> public bool Equals(ImpProcessingTableType other) { if (other == null) { return(false); } return(other.ImpProcessingTableTypeID == ImpProcessingTableTypeID); }
public static ImpProcessing GetLatestImportProcessingForGivenType(DatabaseEntities databaseEntities, ImpProcessingTableType impProcessingTableType) { var latestImportProcessingForPnBudget = databaseEntities.ImpProcessings. Where(ip => ip.ImpProcessingTableTypeID == impProcessingTableType.ImpProcessingTableTypeID). ToList().OrderBy(ip => ip.UploadDate). LastOrDefault(); return(latestImportProcessingForPnBudget); }
/// <summary> /// Creates a "blank" object of this type and populates primitives with defaults /// </summary> public static ImpProcessing CreateNewBlank(ImpProcessingTableType impProcessingTableType) { return(new ImpProcessing(impProcessingTableType)); }
/// <summary> /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible /// </summary> public ImpProcessing(ImpProcessingTableType impProcessingTableType) : this() { // Mark this as a new object by setting primary key with special value this.ImpProcessingID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue(); this.ImpProcessingTableTypeID = impProcessingTableType.ImpProcessingTableTypeID; }