Track source filename for FuelLog
This commit is contained in:
@@ -129,6 +129,9 @@ namespace MileageTraker.Web.Controllers
|
||||
try
|
||||
{
|
||||
var fuelLogs = FuelmanCsvImporter.Import(fileInfo);
|
||||
foreach (var fuelLog in fuelLogs)
|
||||
fuelLog.SourceFilename = fileName;
|
||||
|
||||
// todo: delete file?
|
||||
|
||||
var fls = (from fuelLog in fuelLogs
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace MileageTraker.Web.Migrations
|
||||
MPG = c.Double(nullable: false),
|
||||
GasPurchased = c.Double(nullable: false),
|
||||
TotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
SourceFilename = c.String(),
|
||||
Log_LogId = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.FuelLogId)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -37,5 +37,7 @@ namespace MileageTraker.Web.Models
|
||||
|
||||
// Matched log
|
||||
public virtual Log Log { get; set; }
|
||||
|
||||
public string SourceFilename { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user