具有接口的表不在Entity框架中创建

时间:2014-10-07 11:42:40

标签: c# entity-framework

我现在正在本地使用Entity框架在sql management studio上创建表。

  public class Task
{

    [Key]
    public int TaskId { get; set; }


    public virtual List<IAlgorithmResult> AlgorithmResults { get; set; }

    public BodyRegions BodyRegion { get; set; }

    public ModalityTechnicalData ModalityData { get; set; }

    public int NumberOfSlices { get; set; }


}

public interface IAlgorithmResult
{
    int id { get; set; }
    string AlgorithmVersion { get; set; }
}

  public class ChestPluginResult : IAlgorithmResult, IValidationResult
{
    [Key]
    public int id { get; set; }
    public virtual List<Pathologies> PathologiesFound { get; set; }

    public bool IsSupressNodulesPlugin { get; set; }
    public string AlgorithmVersion { get; set; }
}

  public interface IValidationResult
{
//marker interface
}

public abstract class ModalityTechnicalData
{
    [Key]
    public int Id { get; set; }

    public double Resolution { get; set; }

}

   public class CTTechnicalData : ModalityTechnicalData
{

    public int Radiation { get; set; }

    public double SliceThickness { get; set; }

    public double Gap { get; set; }

    public double SliceGap { get; set; }

    public string FilterType { get; set; }

    public bool IsContrastAgent { get; set; }



}

创建任务表,创建ModalityTechnicalData,不抛出任何异常,但不创建chestPluginResult表。

有没有人有想法?

0 个答案:

没有答案