Update project for multi-targeting and nullable types
Updated `DigitalData.UserManager.Domain.csproj` to support .NET 4.6.2, 7.0, 8.0, and 9.0. Adjusted implicit usings and nullable reference types settings based on the target framework, disabling nullable types for `net462` and enabling them for others. Refactored entity classes (`BaseEntity`, `ClientUser`, `Group`, `GroupOfUser`, `Module`, `ModuleOfUser`, `User`, and `UserRep`) to conditionally include nullable reference types. Added `?` operator for string properties in .NET 7.0 and above, enhancing code safety and reducing null reference exceptions.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
||||
|
||||
[Column("COMMENT")]
|
||||
public string
|
||||
#if NET6_0_OR_GREATER
|
||||
#if NET7_0_OR_GREATER
|
||||
?
|
||||
#endif
|
||||
Comment
|
||||
@@ -34,7 +34,7 @@ namespace DigitalData.UserManager.Domain.Entities
|
||||
[StringLength(50)]
|
||||
[Column("ADDED_WHO")]
|
||||
public string
|
||||
#if NET6_0_OR_GREATER
|
||||
#if NET7_0_OR_GREATER
|
||||
?
|
||||
#endif
|
||||
AddedWho
|
||||
|
||||
Reference in New Issue
Block a user