public void Update(string displayName, byte[] content, FileTypeDao fileType, string?description = null, DateTime?originCreationDate = null) { this.DisplayName = displayName; this.Content = content; this.FileType = fileType; this.Description = description; this.OriginCreationDate = originCreationDate; this.ChangeDate = DateTime.UtcNow; }
#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. public DocumentDao(Guid id, string displayName, byte[] content, FileTypeDao fileType, DateTime creationDate, string?description = null, DateTime?originCreationDate = null, DateTime?changeDate = null) { this.Id = id; this.DisplayName = displayName; this.Content = content; this.FileType = fileType; this.CreationDate = creationDate; this.Description = description; this.OriginCreationDate = originCreationDate; this.ChangeDate = changeDate; }
public FileTypeService(MagmaGenericDbContext magmaGenericDBContext) { fileTypeDao = new FileTypeDao(magmaGenericDBContext); genericResponseFactory = new GenericResponseFactory(); }
public static DocumentDao Create(string displayName, byte[] content, FileTypeDao fileType, string?description = null, DateTime?originCreationDate = null) { return(new DocumentDao(Guid.NewGuid(), displayName, content, fileType, DateTime.UtcNow, description, originCreationDate)); }