|
| 1 | +using System; |
| 2 | +using System.ComponentModel.DataAnnotations; |
| 3 | +using System.Text.Json.Serialization; |
| 4 | + |
| 5 | +namespace ASP_NET_Core.Models { |
| 6 | + public class Employee { |
| 7 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("ID")] |
| 8 | + public int ID { get; set; } |
| 9 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("FirstName")] |
| 10 | + public string FirstName { get; set; } |
| 11 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("LastName")] |
| 12 | + public string LastName { get; set; } |
| 13 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Phone")] |
| 14 | + public string Phone { get; set; } |
| 15 | + |
| 16 | + [Display(Name = "Title")] |
| 17 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Prefix")] |
| 18 | + public string Prefix { get; set; } |
| 19 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Position")] |
| 20 | + public string Position { get; set; } |
| 21 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("BirthDate")] |
| 22 | + public DateTime? BirthDate { get; set; } |
| 23 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("HireDate")] |
| 24 | + public DateTime? HireDate { get; set; } |
| 25 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Notes")] |
| 26 | + public string Notes { get; set; } |
| 27 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Email")] |
| 28 | + public string Email { get; set; } |
| 29 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Address")] |
| 30 | + public string Address { get; set; } |
| 31 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("City")] |
| 32 | + public string City { get; set; } |
| 33 | + |
| 34 | + [Display(Name = "State")] |
| 35 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("StateID")] |
| 36 | + public int? StateID { get; set; } |
| 37 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("State")] |
| 38 | + public string State { get; set; } |
| 39 | + |
| 40 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("AddressRequired")] |
| 41 | + public bool AddressRequired { get; set; } |
| 42 | + } |
| 43 | +} |
0 commit comments