Standardize string property initialization to string.Empty
Replaced String.Empty and null! with string.Empty for string properties in CatalogReadDto, CatalogWriteDto, and VwmyCatalog classes. This ensures consistent initialization and helps prevent null reference issues across the codebase.
This commit is contained in:
@@ -3,9 +3,9 @@ namespace DbFirst.Application.Catalogs;
|
|||||||
public class CatalogReadDto
|
public class CatalogReadDto
|
||||||
{
|
{
|
||||||
public int Guid { get; set; }
|
public int Guid { get; set; }
|
||||||
public string CatTitle { get; set; } = String.Empty;
|
public string CatTitle { get; set; } = string.Empty;
|
||||||
public string CatString { get; set; } = String.Empty;
|
public string CatString { get; set; } = string.Empty;
|
||||||
public string AddedWho { get; set; } = String.Empty;
|
public string AddedWho { get; set; } = string.Empty;
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
public string? ChangedWho { get; set; }
|
public string? ChangedWho { get; set; }
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace DbFirst.Application.Catalogs;
|
|||||||
|
|
||||||
public class CatalogWriteDto
|
public class CatalogWriteDto
|
||||||
{
|
{
|
||||||
public string CatTitle { get; set; } = null!;
|
public string CatTitle { get; set; } = string.Empty;
|
||||||
public string CatString { get; set; } = null!;
|
public string CatString { get; set; } = string.Empty;
|
||||||
public CatalogUpdateProcedure UpdateProcedure { get; set; } = CatalogUpdateProcedure.Update;
|
public CatalogUpdateProcedure UpdateProcedure { get; set; } = CatalogUpdateProcedure.Update;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ namespace DbFirst.BlazorWebApp.Models;
|
|||||||
public class CatalogReadDto
|
public class CatalogReadDto
|
||||||
{
|
{
|
||||||
public int Guid { get; set; }
|
public int Guid { get; set; }
|
||||||
public string CatTitle { get; set; } = null!;
|
public string CatTitle { get; set; } = string.Empty;
|
||||||
public string CatString { get; set; } = null!;
|
public string CatString { get; set; } = string.Empty;
|
||||||
public string AddedWho { get; set; } = null!;
|
public string AddedWho { get; set; } = string.Empty;
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
public string? ChangedWho { get; set; }
|
public string? ChangedWho { get; set; }
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ public partial class VwmyCatalog
|
|||||||
{
|
{
|
||||||
public int Guid { get; set; }
|
public int Guid { get; set; }
|
||||||
|
|
||||||
public string CatTitle { get; set; } = String.Empty;
|
public string CatTitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string CatString { get; set; } = String.Empty;
|
public string CatString { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string AddedWho { get; set; } = String.Empty;
|
public string AddedWho { get; set; } = string.Empty;
|
||||||
|
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user