0
juan.huerta created
Hi,
In the Step by Step Angular guide, it instructs to create a PhoneType enum under .Core Project: https://docs.aspnetzero.com/documents/zero/latest/Developing-Step-By-Step-Angular:
"We have a PhoneType enum as shown below: (in .Core project)"
public enum PhoneType : byte
{
Mobile,
Home,
Business
}
This PhoneType enum is used in the DTOs created in the .Shared project. Specifically is used in hte PhoneInPersonListDto
public class PhoneInPersonListDto : CreationAuditedEntityDto<long>
{
public PhoneType Type { get; set; }
public string Number { get; set; }
}
From .Shared project, there is no visibility nor access t the .Core project. Therefore, the solution can't compile because PhoneType is not found.
Where should the PhoneType be declared?
1 Answer(s)
-
1
Hi, you can create the Enum in
*.Shared
project (it is desgined to keep common class declarations & etc in the same place)