mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-03 05:43:31 +00:00
- Frontend sends accountId as empty string when not set - Change DTO AccountId to string with GetAccountId() parser - Prevents JSON deserialization error on empty/non-numeric values
21 lines
713 B
C#
21 lines
713 B
C#
namespace Api.SeaHavenIndustries.DTOs
|
|
{
|
|
public class EditLocation_DTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Title { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? Address { get; set; }
|
|
public string? City { get; set; }
|
|
public string? State { get; set; }
|
|
public string? ZipCode { get; set; }
|
|
public string? Phone { get; set; }
|
|
public string? Contact { get; set; }
|
|
public string? ContactEmail { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? AccountId { get; set; }
|
|
|
|
public int? GetAccountId() =>
|
|
int.TryParse(AccountId, out var id) ? id : null;
|
|
}
|
|
}
|