Add .NET Framework 4.6.2 support and improve nullability

Updated `DigitalData.UserManager.Domain.csproj` to target .NET Framework 4.6.2 alongside .NET 7.0, 8.0, and 9.0. Corrected `PackageTags` from "user maanger" to "user manager" and added property groups for implicit usings and language versions.

Introduced nullable reference types in entity classes (`BaseEntity`, `ClientUser`, `Group`, `User`, etc.) for enhanced type safety. Updated properties in the `User` and `UserRep` classes to use the new nullable syntax, ensuring consistency across the codebase.

These changes improve compatibility with newer C# features and maintain support for multiple frameworks.
This commit is contained in:
2025-06-26 12:27:24 +02:00
parent 40deb9968f
commit b1075c8b82
9 changed files with 230 additions and 85 deletions

View File

@@ -21,21 +21,41 @@ namespace DigitalData.UserManager.Domain.Entities
[Column("COMMENT")]
[StringLength(200)]
public string? Comment { get; set; }
public string
#if NET6_0_OR_GREATER
?
#endif
Comment { get; set; }
[Column("ADDED_WHO")]
[StringLength(50)]
public string? AddedWho { get; set; } = "DEFAULT";
public string
#if NET6_0_OR_GREATER
?
#endif
AddedWho { get; set; } = "DEFAULT";
[Column("CHANGED_WHO")]
[StringLength(50)]
public string? ChangedWho { get; set; }
public string
#if NET6_0_OR_GREATER
?
#endif
ChangedWho { get; set; }
[ForeignKey("UserId")]
public virtual User? User { get; set; }
public virtual User
#if NET6_0_OR_GREATER
?
#endif
User { get; set; }
[ForeignKey("ModuleId")]
public virtual Module? Module { get; set; }
public virtual Module
#if NET6_0_OR_GREATER
?
#endif
Module { get; set; }
#region IGNORED COLUMNS
//public bool IsAdmin { get; set; }
@@ -53,5 +73,4 @@ namespace DigitalData.UserManager.Domain.Entities
//public DateTime? ChangedWhen { get; set; }
#endregion
}
}