public override MixMedia ParseModel(MixCmsContext _context = null, IDbContextTransaction _transaction = null) { if (Id == 0) { Id = UpdateViewModel.Repository.Max(c => c.Id).Data + 1; CreatedDateTime = DateTime.UtcNow; IsClone = true; Cultures = Cultures ?? LoadCultures(Specificulture, _context, _transaction); Cultures.ForEach(c => c.IsSupported = true); } if (FileFolder[0] == '/') { FileFolder = FileFolder.Substring(1); } return(base.ParseModel(_context, _transaction)); }
public override MixMedia ParseModel(MixCmsContext _context = null, IDbContextTransaction _transaction = null) { if (CreatedDateTime == default) { Id = Id > 0 ? Id : UpdateViewModel.Repository.Max(c => c.Id, _context, _transaction).Data + 1; CreatedDateTime = DateTime.UtcNow; } if (string.IsNullOrEmpty(TargetUrl)) { if (FileFolder[0] == '/') { FileFolder = FileFolder.Substring(1); } } return(base.ParseModel(_context, _transaction)); }
public override SioMedia ParseModel(SioCmsContext _context = null, IDbContextTransaction _transaction = null) { if (CreatedDateTime == default(DateTime)) { Id = Id > 0 ? Id : UpdateViewModel.Repository.Max(c => c.Id).Data + 1; CreatedDateTime = DateTime.UtcNow; IsClone = true; Cultures = Cultures ?? LoadCultures(Specificulture, _context, _transaction); Cultures.ForEach(c => c.IsSupported = true); } if (string.IsNullOrEmpty(TargetUrl)) { if (FileFolder[0] == '/') { FileFolder = FileFolder.Substring(1); } } return(base.ParseModel(_context, _transaction)); }