计算属性更新
parent
ee0ead7017
commit
b36453341c
|
@ -197,7 +197,7 @@ namespace IRaCIS.Api.Controllers
|
|||
StudyId = archivedStudyIds[0],
|
||||
UploadStartTime = startTime,
|
||||
UploadFinishedTime = DateTime.Now,
|
||||
TotalMillisecondsInterval = (DateTime.Now- startTime).TotalMilliseconds,
|
||||
//TotalMillisecondsInterval = (DateTime.Now- startTime).TotalMilliseconds,
|
||||
FileSize = (decimal)HttpContext.Request.ContentLength,
|
||||
FileCount = archiveResult.ReceivedFileCount,
|
||||
IsDicom = true,
|
||||
|
|
|
@ -303,7 +303,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
FileCount = formCollection.Files.Count, FileSize = formCollection.Files.Sum(t => t.Length), IsDicom = false,
|
||||
IsDicomReUpload = false, StudyId = noneDicomStudyId,
|
||||
UploadStartTime = startTime, UploadFinishedTime = DateTime.Now, IP = _userInfo.IP,
|
||||
TotalMillisecondsInterval = (DateTime.Now - startTime).TotalMilliseconds,
|
||||
//TotalMillisecondsInterval = (DateTime.Now - startTime).TotalMilliseconds,
|
||||
TrialId = sv.TrialId,
|
||||
SiteId = sv.SiteId,
|
||||
SubjectId = sv.SubjectId,
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
|
||||
|
||||
public double TotalMillisecondsInterval { get; set; }
|
||||
public int TotalMillisecondsInterval { get; set; }
|
||||
|
||||
public DateTime UploadStartTime { get; set; }
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
|
||||
//modelBuilder.Entity<User>().Property(t => t.FullName) .HasDefaultValueSql("[LastName] + ' / ' + [FirstName]");
|
||||
//modelBuilder.Entity<User>().Property(e => e.FullName).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore);
|
||||
|
||||
|
||||
//遍历实体模型手动配置
|
||||
|
@ -88,15 +87,12 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
{
|
||||
dynamic configurationInstance = Activator.CreateInstance(type);
|
||||
modelBuilder.ApplyConfiguration(configurationInstance);
|
||||
|
||||
}
|
||||
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
|
||||
|
||||
//modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(_userInfo.IsEn_Us ? "Value" : "ValueCN").UsePropertyAccessMode(PropertyAccessMode.Property);
|
||||
|
||||
//code first must migration dbfirst must config in db
|
||||
modelBuilder.Entity<StudyMonitor>().Property(e => e.TotalMillisecondsInterval).HasComputedColumnSql("datediff(MS,UploadStartTime,UploadFinishedTime)");
|
||||
|
||||
|
||||
// 软删除配置
|
||||
|
|
Loading…
Reference in New Issue