builder.Property(e => e.Role) .HasConversion( v => v.ToString(), v => Enum.Parse<MemberRole>(v)) .IsRequired();
enum
int
om.Role != MemberRole.None
public ICollection<Shift> Shifts { get; set; } = new HashSet<Shift>();
Department
public class Shift{ public int DepartmentId { get; init; } public Department Department { get; init; } }