-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathContactDto.cs
More file actions
48 lines (42 loc) · 1.58 KB
/
ContactDto.cs
File metadata and controls
48 lines (42 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//------------------------------------------------------------------------------
// <auto-generated>
// CleanArchitecture.Blazor - MIT Licensed.
// Author: neozhu
// Created/Modified: 2025-03-19
// ContactDto: transfers contact data between layers.
// Docs: https://docs.cleanarchitectureblazor.com/features/contact
// </auto-generated>
//------------------------------------------------------------------------------
//
// Usage:
// Use ContactDto to represent contact data across commands, queries, and views.
namespace CleanArchitecture.Blazor.Application.Features.Contacts.DTOs;
[Description("Contacts")]
public class ContactDto
{
[Description("Id")]
public int Id { get; set; }
[Description("Name")]
public string Name {get;set;}
[Description("Description")]
public string? Description {get;set;}
[Description("Email")]
public string? Email {get;set;}
[Description("Phone number")]
public string? PhoneNumber {get;set;}
[Description("Country")]
public string? Country {get;set;}
private class Mapping : Profile
{
public Mapping()
{
CreateMap<Contact, ContactDto>(MemberList.None);
CreateMap<ContactDto, Contact>(MemberList.None)
.ForMember(dest => dest.Created, opt => opt.Ignore())
.ForMember(dest => dest.CreatedBy, opt => opt.Ignore())
.ForMember(dest => dest.LastModified, opt => opt.Ignore())
.ForMember(dest => dest.LastModifiedBy, opt => opt.Ignore())
.ForMember(dest => dest.DomainEvents, opt => opt.Ignore());
}
}
}