1
나는 다음과 같은 엔티티 모델이 있습니다Entity Framework에서 nullable 데이터베이스 열에 매핑되는 값 형식을 어떻게 가질 수 있습니까?
public class Todo
{
[Required]
public int ID { get; set; }
public int OrderId { get; set; } //Not required
public string Description { get; set; }
public bool Finished { get; set; }
public DateTime CreationDate { get; set; }
public int Priority { get; set; } //Not required
public string CreatedBy { get; set; }
public bool Deleted { get; set; }
}
모든 필드는 "null가 아닌"로 생성 된 해당 데이터베이스 테이블에 있습니다. 일부 필드가 null이되도록 허용하려고합니다. 어떻게해야합니까?
작품! questionmark 트릭을했다. 고맙습니다! :-) – user547311