Refactor entity properties for nullability and requirements
Removed nullable indicators from string properties in BaseEntity.cs, ClientUser.cs, Group.cs, and User.cs. The Username property in User.cs is now marked as required for .NET 7 or greater, improving data integrity and reducing null reference risks.
This commit is contained in:
@@ -26,7 +26,11 @@ namespace DigitalData.UserManager.Domain.Entities
|
||||
[Required]
|
||||
[Column("USERNAME")]
|
||||
[StringLength(50)]
|
||||
public string Username { get; set; }
|
||||
public
|
||||
#if NET7_0_OR_GREATER
|
||||
required
|
||||
#endif
|
||||
string Username { get; set; }
|
||||
|
||||
[Column("SHORTNAME")]
|
||||
[StringLength(30)]
|
||||
|
||||
Reference in New Issue
Block a user