Fix Incorrect datetime value: '0001-01-01 00:00:00' for column 'last_modified' at row 1
This commit is contained in:
parent
e860d1ab76
commit
98b69d6492
@ -382,9 +382,10 @@ namespace ASC.Core.Data
|
||||
{
|
||||
Id = key,
|
||||
Tenant = tenant,
|
||||
Value = data
|
||||
Value = data,
|
||||
LastModified = DateTime.UtcNow
|
||||
};
|
||||
TenantDbContext.CoreSettings.Add(settings);
|
||||
TenantDbContext.AddOrUpdate(r => r.CoreSettings, settings);
|
||||
}
|
||||
TenantDbContext.SaveChanges();
|
||||
tx.Commit();
|
||||
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace ASC.Core.Common.EF.Model
|
||||
{
|
||||
[Table("core_settings")]
|
||||
public class DbCoreSettings
|
||||
public class DbCoreSettings : BaseEntity
|
||||
{
|
||||
public int Tenant { get; set; }
|
||||
public string Id { get; set; }
|
||||
@ -13,6 +13,11 @@ namespace ASC.Core.Common.EF.Model
|
||||
|
||||
[Column("last_modified")]
|
||||
public DateTime LastModified { get; set; }
|
||||
|
||||
public override object[] GetKeys()
|
||||
{
|
||||
return new object[] { Tenant, Id };
|
||||
}
|
||||
}
|
||||
|
||||
public static class CoreSettingsExtension
|
||||
|
Loading…
Reference in New Issue
Block a user