Class Contact
Represents a contact entity.
Implements
Inherited Members
Namespace: Innovt.Domain.Contacts
Assembly: Innovt.Domain.dll
Syntax
public class Contact : ValueObject<int>, IValidatableObject
Properties
| Edit this page View SourceDescription
For example Home, Office etc
Declaration
[Required]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
IsDeleted
Gets or sets a value indicating whether the contact is deleted.
Declaration
public bool IsDeleted { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets or sets the name associated with the contact.
Declaration
[Required]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
Gets or sets the contact type.
Declaration
[Required]
public ContactType Type { get; set; }
Property Value
Type | Description |
---|---|
ContactType |
Value
Gets or sets the contact value (e.g., phone number, email address).
Declaration
[Required]
public string Value { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceValidate(ValidationContext)
Validates the contact properties based on the contact type.
Declaration
public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
ValidationContext | validationContext | The validation context. |
Returns
Type | Description |
---|---|
IEnumerable<ValidationResult> | A collection of validation results. |