Get chart file a bit quicker from DB

This commit is contained in:
2016-05-13 12:31:40 -04:00
parent 48e7578de7
commit 568211251b
3 changed files with 28 additions and 15 deletions
+8 -4
View File
@@ -3,6 +3,11 @@ namespace LeafWeb.Core.Entities
{
public class LeafOutputFile
{
// convention for the filename which LeafCharter uses
public const string Filename_LeafChart = "leafgascomparison";
public const string Filename_ErrorMessage = "errormessage";
public const string Filename_WarningMessage = "warningmessage";
public int Id { get; set; }
public virtual LeafInput LeafInput { get; set; }
@@ -11,9 +16,8 @@ namespace LeafWeb.Core.Entities
public byte[] Contents { get; set; }
// convention for the filename which LeafCharter uses
public bool IsLeafChartFile => Filename?.Contains("leafgascomparison") ?? false;
public bool IsErrorMessage => Filename?.Contains("errormessage") ?? false;
public bool IsWarningMessage => Filename?.Contains("warningmessage") ?? false;
public bool IsLeafChartFile => Filename?.Contains(Filename_LeafChart) ?? false;
public bool IsErrorMessage => Filename?.Contains(Filename_ErrorMessage) ?? false;
public bool IsWarningMessage => Filename?.Contains(Filename_WarningMessage) ?? false;
}
}