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:
OlgunR
2026-04-22 09:25:03 +02:00
parent 1b4205219f
commit f54de87ca2
4 changed files with 11 additions and 11 deletions

View File

@@ -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; }

View File

@@ -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;
} }

View File

@@ -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; }

View File

@@ -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; }