0
다음 필드가있는 테이블이 있습니다. 테이블의 기존 값을 업데이트 할 수 없습니다. 기본 키가 아닌 SourceId를 기반으로 업데이트하고 싶습니다. (Id는 기본 키입니다.) 아래는 클래스 표현입니다.PetaPoco Insert/Update
PetaPoco.cs 파일을 수정하고 싶지 않습니다. 도와주세요. 고맙습니다.
[TableName("Incident")]
[PrimaryKey("Id", AutoIncrement = true)]
public class Incident
{
public int Id { get; set; }
public string SourceId { get; set; }
public int AgencyId { get; set; }
public DateTime? OccurredOn { get; set; }
public DateTime? ImportedOn { get; set; }
public DateTime? LastUpdatedOn { get; set; }
}