Esempio n. 1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(TabularDataImportTableType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.TabularDataImportTableTypeID == TabularDataImportTableTypeID);
 }
        public static TabularDataImport GetLatestImportProcessingForGivenType(List <TabularDataImport> tabularDataImportList, TabularDataImportTableType tabularDataImportTableType)
        {
            var latest = tabularDataImportList.Where(ip => ip.TabularDataImportTableTypeID == tabularDataImportTableType.TabularDataImportTableTypeID).
                         ToList().OrderBy(ip => ip.UploadDate).
                         LastOrDefault();

            return(latest);
        }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static TabularDataImport CreateNewBlank(TabularDataImportTableType tabularDataImportTableType)
 {
     return(new TabularDataImport(tabularDataImportTableType));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public TabularDataImport(TabularDataImportTableType tabularDataImportTableType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.TabularDataImportID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.TabularDataImportTableTypeID = tabularDataImportTableType.TabularDataImportTableTypeID;
 }