C# LINQ查询异常错误无效列名';课程编号1';埃夫科尔

C# LINQ查询异常错误无效列名';课程编号1';埃夫科尔,c#,entity-framework,linq,entity-framework-core,C#,Entity Framework,Linq,Entity Framework Core,我正在尝试对数据库上下文运行LINQ查询: IList<meeting> meetings; var festivalRange = new { Start = festivalStartDate.Date, End = festivalStartDate.Date.AddDays(festivalLength - 1) }; using(CamelotViewsS

我正在尝试对数据库上下文运行LINQ查询:

  IList<meeting> meetings;

        var festivalRange = new
        {
            Start = festivalStartDate.Date,
            End = festivalStartDate.Date.AddDays(festivalLength - 1)
        };

        using(CamelotViewsStandardContext db = new CamelotViewsStandardContext() )
        {
            meetings = db.meetings.Include("races").Where(x => x.courseId == 10 && x.meetingDate >= festivalRange.Start && x.meetingDate <= festivalRange.End).OrderBy(x => x.meetingDate).ToList();
        }
我的数据库表中没有“courseId1”,也没有映射到实体模型

这是我的“会议”模型生成器和模型:

            //Meeting
        modelBuilder.Entity<meeting>(entity =>
        {
            entity.ToTable("meeting_vw");
            entity.HasMany(x => x.races).WithOne(c => c.meeting);
            entity.HasKey(x => x.courseId);
            entity.HasKey(x => x.meetingDate);
        });


 public class meeting : IMeetingKey
{
    public DateTime meetingDate { get; set; }

    /// <summary>
    ///The ID of the course of the meeting and is part of the primary key
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int courseId { get; set; }

    /// <summary>
    ///The full name of the course that of the meeting
    ///</summary>
    ///<value>Upper case</value>
    ///<returns>String</returns>
    ///<remarks>An example: HAYDOCK PARK</remarks>
    ///<permission>Standard</permission>
    public string courseName { get; set; }

    /// <summary>
    ///The type of surface that is raced on at the meeting
    ///</summary>
    ///<value>Title case</value>
    ///<returns>String</returns>
    ///<remarks>Values are All Weather, Turf or Both</remarks>
    ///<permission>Standard</permission>
    public string meetingSurfaceName { get; set; }

    /// <summary>
    ///The one character representation of the type of surface that is raced on at the meeting
    ///</summary>
    ///<value>One char</value>
    ///<returns>String(1)</returns>
    ///<remarks>Values are A - All Weather, T - Turf, B - Both</remarks>
    ///<permission>Standard</permission>
    public string meetingSurfaceChar { get; set; }

    /// <summary>
    ///The status of the meeting
    ///</summary>
    ///<value>"" If no status is available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no status available, an example: Abandoned</remarks>
    ///<permission>Standard</permission>
    public string meetingStatus { get; set; }

    /// <summary>
    ///The type of racing
    ///</summary>
    ///<value>Title Case</value>
    ///<returns></returns>
    ///<remarks>Values are Flat, Jump, Both</remarks>
    ///<permission>Standard</permission>
    public string meetingRaceType { get; set; }

    /// <summary>
    ///The suffix of the meeting number as per the racing calendar
    ///</summary>
    ///<value>"" if no suffix is available, upper case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no suffix, an example: B</remarks>
    ///<permission>Standard</permission>
    public string meetingNumberSuffix { get; set; }

    /// <summary>
    ///The meeting number as per the racing calendar
    ///</summary>
    ///<value>0 if no number is available, positive integer if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - no meeting number, an example 255</remarks>
    ///<permission>Standard</permission>
    public int meetingNumber { get; set; }

    /// <summary>
    ///The time that any inspection is due to take place
    ///</summary>
    ///<value>1900-01-01 00:00:00.000 if no inspection is to take place, valid date time if it is</value>
    ///<returns>Date Time</returns>
    ///<remarks>1900-01-01 00:00:00.000 - no inspection, an example 2015-06-01 10:30:27.234</remarks>
    ///<permission>Standard</permission>
    public DateTime inspectionTime { get; set; }

    /// <summary>
    ///The official going report for the meeting
    ///</summary>
    ///<value>"" if no report is available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no report, </remarks>
    ///<permission>Standard</permission>
    public string meetingGoing { get; set; }


    /// <summary>
    ///Internal Publish Flag
    ///</summary>
    ///<value>Internal Use Only</value>
    ///<returns>Integer</returns>
    ///<remarks>Internal Use Only</remarks>
    ///<permission>Standard</permission>
    public int publishFlag { get; set; }

    public course course { get; set; }
    public List<race> races { get; set; } = new List<race>();
}
            //Races
        modelBuilder.Entity<race>(entity =>
        {
            entity.ToTable("race_standard_vw");
            entity.HasKey(x => x.meetingDate);
            entity.HasKey(x => x.courseId);
            entity.HasKey(x => x.raceNumber);
        });

    public class race : IRaceKey
{

    /// <summary>
    ///The date of the race and part of the primary key
    ///</summary>
    ///<value>Not Null</value>
    ///<returns>Date</returns>
    ///<remarks>Date of the race in the format yyyy-mm-dd</remarks>
    ///<permission>Standard</permission>
    public DateTime meetingDate { get; set; }

    /// <summary>
    ///The ID of the course that the race took place at and is part of the primary key
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int courseId { get; set; }

    /// <summary>
    ///The number of the race and is part of the primary key
    ///</summary>
    ///<value>1 or higher</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int raceNumber { get; set; }

    /// <summary>
    ///The full name of the course
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String</returns>
    ///<remarks>An example: HAYDOCK PARK</remarks>
    ///<permission>Standard</permission>
    public string courseName { get; set; }

    /// <summary>
    ///The 3 character course abbreviation
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String(3)</returns>
    ///<remarks>An example: Hay</remarks>
    ///<permission>Standard</permission>
    public string courseAbbrev { get; set; }

    /// <summary>
    ///The time that the race was due to start where the race was being run
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime startTimeLocalScheduled { get; set; }

    /// <summary>
    ///The time that the race was due to start at GMT
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime startTimeGMTScheduled { get; set; }

    /// <summary>
    ///The time that the race actually started where the race was being run
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime actualTimeLocalScheduled { get; set; }


    /// <summary>
    ///The time that the race actually started at GMT
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime actualTimeGMTScheduled { get; set; }

    /// <summary>
    ///The type of surface that is being run on
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are All Weather or Turf </remarks>
    ///<permission>Standard</permission>
    public string raceSurfaceChar { get; set; }

    /// <summary>
    ///The one character representation of the type of surface of the race
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are A or T </remarks>
    ///<permission>Standard</permission>
    public string raceSurfaceName { get; set; }

    /// <summary>
    ///The type of racing
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are Flat, Hurdle, Chase, Bumper</remarks>
    ///<permission>Standard</permission>
    public string raceType { get; set; }

    /// <summary>
    ///The number of complete furlongs the race will be run over
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>an example: 8</remarks>
    ///<permission>Standard</permission>
    public int distanceFurlongs { get; set; }

    /// <summary>
    ///The number of yards the race will be run over in addition to the furlongs
    ///</summary>
    ///<value>May be 0 if the race is at an exact furlong distance</value>
    ///<returns>Integer</returns>
    ///<remarks>an example: 212</remarks>
    ///<permission>Standard</permission>
    public int distanceYards { get; set; }

    /// <summary>
    ///The race distance in decimal furlongs
    ///</summary>
    ///<value>Above 0.0</value>
    ///<returns>Decimal</returns>
    ///<remarks>an example: 8.51</remarks>
    ///<permission>Standard</permission>
    public decimal distance { get; set; }

    /// <summary>
    ///The race distance as text format
    ///</summary>
    ///<value>Display text for the distance of the race</value>
    ///<returns>String</returns>
    ///<remarks>an example: 1M 4F 50y</remarks>
    ///<permission>Standard</permission>
    public string distanceText { get; set; }

    /// <summary>
    ///The full name of the race
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String</returns>
    ///<remarks>An Example: BETFRED CHELTENHAM GOLD CUP (Grade 1)</remarks>
    ///<permission>Standard</permission>
    public string raceTitle { get; set; }

    /// <summary>
    ///The short name of the race
    ///</summary>
    ///<value>Title case</value>
    ///<returns>String</returns>
    ///<remarks>An Example: Cheltenham Gold Cup</remarks>
    ///<permission>Standard</permission>
    public string raceTitleShort { get; set; }

    /// <summary>
    ///The Timeform going of the race
    ///</summary>
    ///<value>"" if no report is available, char if it is</value>
    ///<returns>String</returns>
    ///<remarks>Gd/Frm, Good, Soft, Gd/Sft</remarks>
    ///<permission>Standard</permission>
    public string going { get; set; }

    /// <summary>
    ///The Timeform single character going abbreviation
    ///</summary>
    ///<value>"" if no report is available, char if it is</value>
    ///<returns>String(1)</returns>
    ///<remarks>m, g, s, d</remarks>
    ///<permission>Standard</permission>
    public string goingAbbrev { get; set; }

    /// <summary>
    ///The official going of the race
    ///</summary>
    ///<value>"" if no report is available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no report, </remarks>
    ///<permission>Standard</permission>
    public string goingOfficial { get; set; }

    /// <summary>
    ///The maximum age eligibility of the race
    ///</summary>
    ///<value>Can be an integer or a char</value>
    ///<returns>String(1)</returns>
    ///<remarks>If integer then that is the explicit age max, + = no max age, O - limited to the min age</remarks>
    ///<permission>Standard</permission>
    public string eligibilityAgeMax { get; set; }

    /// <summary>
    ///The minimum age eligibility of the race
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>An example: 4</remarks>
    ///<permission>Standard</permission>
    public int? eligibilityAgeMin { get; set; }

    /// <summary>
    ///The number of runners either currently entered or that ran in the race
    ///</summary>
    ///<value>If 0, the value hasnt yet been calculated, above 0 if it has</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - runners not yet known, an example: 5</remarks>
    ///<permission>Standard</permission>
    public int numberOfRunners { get; set; }

    /// <summary>
    ///The number of horses that will qualify as being placed under standard bookmaking terms
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>An example: 3</remarks>
    ///<permission>Standard</permission>
    public int numberOfPlaces { get; set; }

    /// <summary>
    ///Details of a sex limit on the race
    ///</summary>
    ///<value>"" if no limit is involved</value>
    ///<returns>String(2)</returns>
    ///<remarks>"" means there is no sex limit, F - fillies, M - mares, C - colts, G - Geldered</remarks>
    ///<permission>Standard</permission>
    public string eligibilitySexLimit { get; set; }

    /// <summary>
    ///The current status of the race
    ///</summary>
    ///<value>"" - no status available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no status available, an example: "Weighed In"</remarks>
    ///<permission>Standard</permission>
    public string resultsStatus { get; set; }

    /// <summary>
    ///Character value for the type of race
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String(1)</returns>
    ///<remarks>N - Bumper, F - Flat, H - Hurdle, C - Chase</remarks>
    ///<permission>Standard</permission>
    public string raceTypeChar { get; set; }

    /// <summary>
    ///Representation of the flavour of race (handicap, group etc)
    ///</summary>
    ///<value>"" If not available, upper case if it is</value>
    ///<returns>String(2)</returns>
    ///<remarks>"" - not available, an example: H</remarks>
    ///<permission>Standard</permission>
    public string raceCode { get; set; }

    /// <summary>
    ///Total prize fund of the race
    ///</summary>
    ///<value>0.0 if not available, above 0.0 if it is </value>''
    ///<returns>Decimal</returns>
    ///<remarks>0.0 - not available, an example 9000.00</remarks>
    ///<permission>Standard</permission>
    public decimal prizeFund { get; set; }

    /// <summary>
    ///Prize fund for the winner of the race
    ///</summary>
    ///<value>0.0 if not available, above 0.0 if it is </value>
    ///<returns>Decimal</returns>
    ///<remarks>0.0 - not available, an example 9000.00</remarks>
    ///<permission>Standard</permission>
    public decimal prizeFundWinner { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 5 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw1 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 4 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw2 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 3 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw3 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 2 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw4 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race last time
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw5 { get; set; }

    /// <summary>
    ///The Timeform Weight For Age
    ///</summary>
    ///<value>"" - not available</value>
    ///<returns>String</returns>
    ///<remarks>Example: TWFA 3 9-4 TWFA 4 9-13 </remarks>
    ///<permission>Premium</permission>
    public string tfwfa { get; set; }

    /// <summary>
    ///The premium post-race review of the race
    ///</summary>
    ///<value>"" if the comment hasn't been written, Title Case if it has</value>
    ///<returns>String</returns>
    ///<remarks>"" - no comment written, an example: "Winner impressive, others disapointed"</remarks>
    ///<permission>Premium</permission>
    public string perspectiveComment { get; set; }

    /// <summary>
    ///The Timeform Analyst pre-race predictions for the race
    ///</summary>
    ///<value>"" if not available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: HURRICANE FLY looks certain to take this race</remarks>
    ///<permission>Standard</permission>
    public string analystVerdict { get; set; }

    /// <summary>
    ///The comment for flat racing which is based on analysis of previous races at this course over the same distance
    ///</summary>
    ///<value>"" if not available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Strongly favours low</remarks>
    ///<permission>Standard</permission>
    public string drawComment { get; set; }

    /// <summary>
    ///Information about in play records at the course
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Dundalk ranked 18 of 21 flat Irish courses for horses beaten at 1.01</remarks>
    ///<permission>Standard</permission>
    public string ipHintsGeneral { get; set; }

    /// <summary>
    ///Information about horses in the race based on their past trading and run style information
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Buywise traded at 1.50 on its last start when losing but travelling strongly in rear</remarks>
    ///<permission>Standard</permission>
    public string ipHintsPriceRunStyle { get; set; }


    /// <summary>
    ///Information about horses in the race based on their past trading information
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Milarrow traded at more than 5 times BSP twice when winning during its last 5 starts., Celtus has traded at 50% or less of BSP 4 times on its last 5 starts. </remarks>
    ///<permission>Standard</permission>
    public string iPriceHistory { get; set; }

    /// <summary>
    ///A prediction on the likely pace of the race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Strongly contested </remarks>
    ///<permission>Standard</permission>
    public string ipHintsOverallPace { get; set; }

    /// <summary>
    ///A prediction on the likely shape of the race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Kruzhlinin is unlikely to get things its own way close up and could therefore prove vulnerable in the finish: With no shortage of likely pace-forcers, Parsnip Pete may have a running style that suits. </remarks>
    ///<permission>Standard</permission>
    public string ipHintsSpecificPace { get; set; }

    /// <summary>
    ///An integer value of the race state
    ///</summary>
    ///<value>0 - unknown, above 0 is a valid state</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - unknown, an example 22 - weighed in</remarks>
    ///<permission>Standard</permission>
    public int raceStateId { get; set; }

    /// <summary>
    ///For handicaps the lower handicap mark for a horse to qualify to run
    ///</summary>
    ///<value>0 if not applicable, above 0 for a valid mark</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - limit not applicable, an example 130</remarks>
    ///<permission>Standard</permission>
    public int ratingLimitLower { get; set; }

    /// <summary>
    ///For handicaps the upper handicap mark for a horse to qualify to run
    ///</summary>
    ///<value>0 if not applicable, above 0 for a valid mark</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - limit not applicable, an example 130</remarks>
    ///<permission>Standard</permission>
    public int ratingLimitUpper { get; set; }

    /// <summary>
    ///The class of race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" if not available, an example 2</remarks>
    ///<permission>Standard</permission>
    public string raceClass { get; set; }

    /// <summary>
    ///The highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat1 { get; set; }

    /// <summary>
    ///The second highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat2 { get; set; }

    /// <summary>
    ///The third highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat3 { get; set; }

    /// <summary>
    ///The Betfair market ID of this race if mapped
    ///</summary>
    ///<value>"" if not mapped to a Betfair market, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no market mapped, an example: 12321 </remarks>
    ///<permission>Standard</permission>
    public string bfMarketId { get; set; }

    /// <summary>
    ///The finishing time of the race in seconds
    ///</summary>
    ///<value>0 if the time in unavailable</value>
    ///<returns>Decimal</returns>
    ///<remarks>0 - if no time available, an example: 130.52</remarks>
    ///<permission>Standard</permission>
    public decimal finishingTime { get; set; }

    /// <summary>
    ///The time it took the leader at the point the sectional was taken to complete the race
    ///</summary>
    ///<value>0 if the time in unavailable</value>
    ///<returns>Decimal</returns>
    ///<remarks>0 - if unavailable, measured in seconds to two decimal places</remarks>
    ///<permission>Premium</permission>
    public decimal leaderSectional { get; set; }

    public decimal winnerSectional { get; set; }

    public decimal distanceSectional { get; set; }

    public decimal sectionalFinishingTime { get; set; }

    // Additional fields MDB 2016-01-08
    public int courseExtraId { get; set; }
    public string distanceType { get; set; }
    public string tv { get; set; }
    public int perspectiveNumber { get; set; }

    public int hotRace { get; set; }

    public string raceId { get; set; }

    public int numberOfFencesJumped { get; set; }

    /// <summary>
    ///Internal Publish Flag
    ///</summary>
    ///<value>Internal Use Only</value>
    ///<returns>Integer</returns>
    ///<remarks>Internal Use Only</remarks>
    ///<permission>Standard</permission>
    [JsonIgnore]
    public int publishFlag { get; set; }


    public string paceMapsIdealPosition { get; set; }

    public string resultNotes { get; set; }


    public virtual meeting meeting { get; set; }
    public virtual List<entry> entries { get; set; } = new List<entry>();
    public virtual List<performance> performances { get; set; } = new List<performance>();
}
//会议
modelBuilder.Entity(Entity=>
{
实体。ToTable(“meeting_vw”);
entity.hasmy(x=>x.races),其中一个(c=>c.meeting);
entity.HasKey(x=>x.courseId);
entity.HasKey(x=>x.meetingDate);
});
公开班会:IMeetingKey
{
公共日期时间会议日期{get;set;}
/// 
///会议过程的ID,是主键的一部分
///
///0以上
///整数
///主键(PK)的一部分
///标准
public int courseId{get;set;}
/// 
///课程的全名和会议的全名
///
///大写字母
///串
///例如:海多克公园
///标准
公共字符串courseName{get;set;}
/// 
///在会议上进行比赛的表面类型
///
///产权案
///串
///价值观是全天候、草皮或两者兼而有之
///标准
公共字符串meetingSurfaceName{get;set;}
/// 
///在会议上比赛的曲面类型的单字符表示
///
///一个字符
///字符串(1)
///数值为A-全天候,T-草坪,B-两者
///标准
公共字符串meetingSurfaceChar{get;set;}
/// 
///会议情况
///
///“”如果没有可用的状态,则使用标题大小写
///串
///“”-无可用状态,例如:已放弃
///标准
公共字符串meetingStatus{get;set;}
/// 
///比赛的类型
///
///产权案
///
///值是平坦的、跳跃的,两者都是
///标准
公共字符串meetingRaceType{get;set;}
/// 
///比赛日历上的会议号码后缀
///
///“”如果没有后缀,请使用大写字母
///串
///“”-没有后缀,例如:B
///标准
公共字符串meetingNumberSuffix{get;set;}
/// 
///比赛日历上的会议号码
///
///如果没有可用的数字,则为0;如果为正整数,则为正整数
///整数
///0-没有会议号码,例如255
///标准
公共int会议编号{get;set;}
/// 
///任何检查应进行的时间
///
///1900-01-01 00:00:00.000如果不进行检查,则为有效日期时间
///日期时间
///1900-01-01 00:00:00.000-不检查,示例2015-06-01 10:30:27.234
///标准
公共日期时间检查时间{get;set;}
/// 
///会议的正式报告
///
///“”如果没有可用的报告,则使用标题大小写
///串
///“-没有报告,
///标准
公共字符串MeetingGong{get;set;}
/// 
///内部发布标志
///
///仅供内部使用
///整数
///仅供内部使用
///标准
public int publishFlag{get;set;}
公共课程{get;set;}
公共列表竞赛{get;set;}=new List();
}
我开始认为这是一个与“种族”连接的模型部分有关的问题

以下是模型生成器和模型:

            //Meeting
        modelBuilder.Entity<meeting>(entity =>
        {
            entity.ToTable("meeting_vw");
            entity.HasMany(x => x.races).WithOne(c => c.meeting);
            entity.HasKey(x => x.courseId);
            entity.HasKey(x => x.meetingDate);
        });


 public class meeting : IMeetingKey
{
    public DateTime meetingDate { get; set; }

    /// <summary>
    ///The ID of the course of the meeting and is part of the primary key
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int courseId { get; set; }

    /// <summary>
    ///The full name of the course that of the meeting
    ///</summary>
    ///<value>Upper case</value>
    ///<returns>String</returns>
    ///<remarks>An example: HAYDOCK PARK</remarks>
    ///<permission>Standard</permission>
    public string courseName { get; set; }

    /// <summary>
    ///The type of surface that is raced on at the meeting
    ///</summary>
    ///<value>Title case</value>
    ///<returns>String</returns>
    ///<remarks>Values are All Weather, Turf or Both</remarks>
    ///<permission>Standard</permission>
    public string meetingSurfaceName { get; set; }

    /// <summary>
    ///The one character representation of the type of surface that is raced on at the meeting
    ///</summary>
    ///<value>One char</value>
    ///<returns>String(1)</returns>
    ///<remarks>Values are A - All Weather, T - Turf, B - Both</remarks>
    ///<permission>Standard</permission>
    public string meetingSurfaceChar { get; set; }

    /// <summary>
    ///The status of the meeting
    ///</summary>
    ///<value>"" If no status is available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no status available, an example: Abandoned</remarks>
    ///<permission>Standard</permission>
    public string meetingStatus { get; set; }

    /// <summary>
    ///The type of racing
    ///</summary>
    ///<value>Title Case</value>
    ///<returns></returns>
    ///<remarks>Values are Flat, Jump, Both</remarks>
    ///<permission>Standard</permission>
    public string meetingRaceType { get; set; }

    /// <summary>
    ///The suffix of the meeting number as per the racing calendar
    ///</summary>
    ///<value>"" if no suffix is available, upper case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no suffix, an example: B</remarks>
    ///<permission>Standard</permission>
    public string meetingNumberSuffix { get; set; }

    /// <summary>
    ///The meeting number as per the racing calendar
    ///</summary>
    ///<value>0 if no number is available, positive integer if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - no meeting number, an example 255</remarks>
    ///<permission>Standard</permission>
    public int meetingNumber { get; set; }

    /// <summary>
    ///The time that any inspection is due to take place
    ///</summary>
    ///<value>1900-01-01 00:00:00.000 if no inspection is to take place, valid date time if it is</value>
    ///<returns>Date Time</returns>
    ///<remarks>1900-01-01 00:00:00.000 - no inspection, an example 2015-06-01 10:30:27.234</remarks>
    ///<permission>Standard</permission>
    public DateTime inspectionTime { get; set; }

    /// <summary>
    ///The official going report for the meeting
    ///</summary>
    ///<value>"" if no report is available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no report, </remarks>
    ///<permission>Standard</permission>
    public string meetingGoing { get; set; }


    /// <summary>
    ///Internal Publish Flag
    ///</summary>
    ///<value>Internal Use Only</value>
    ///<returns>Integer</returns>
    ///<remarks>Internal Use Only</remarks>
    ///<permission>Standard</permission>
    public int publishFlag { get; set; }

    public course course { get; set; }
    public List<race> races { get; set; } = new List<race>();
}
            //Races
        modelBuilder.Entity<race>(entity =>
        {
            entity.ToTable("race_standard_vw");
            entity.HasKey(x => x.meetingDate);
            entity.HasKey(x => x.courseId);
            entity.HasKey(x => x.raceNumber);
        });

    public class race : IRaceKey
{

    /// <summary>
    ///The date of the race and part of the primary key
    ///</summary>
    ///<value>Not Null</value>
    ///<returns>Date</returns>
    ///<remarks>Date of the race in the format yyyy-mm-dd</remarks>
    ///<permission>Standard</permission>
    public DateTime meetingDate { get; set; }

    /// <summary>
    ///The ID of the course that the race took place at and is part of the primary key
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int courseId { get; set; }

    /// <summary>
    ///The number of the race and is part of the primary key
    ///</summary>
    ///<value>1 or higher</value>
    ///<returns>Integer</returns>
    ///<remarks>Part of the primary key (PK)</remarks>
    ///<permission>Standard</permission>
    public int raceNumber { get; set; }

    /// <summary>
    ///The full name of the course
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String</returns>
    ///<remarks>An example: HAYDOCK PARK</remarks>
    ///<permission>Standard</permission>
    public string courseName { get; set; }

    /// <summary>
    ///The 3 character course abbreviation
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String(3)</returns>
    ///<remarks>An example: Hay</remarks>
    ///<permission>Standard</permission>
    public string courseAbbrev { get; set; }

    /// <summary>
    ///The time that the race was due to start where the race was being run
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime startTimeLocalScheduled { get; set; }

    /// <summary>
    ///The time that the race was due to start at GMT
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime startTimeGMTScheduled { get; set; }

    /// <summary>
    ///The time that the race actually started where the race was being run
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime actualTimeLocalScheduled { get; set; }


    /// <summary>
    ///The time that the race actually started at GMT
    ///</summary>
    ///<value>yyyy-mm-ddd hh:mm:ss:ms</value>
    ///<returns>Date Time</returns>
    ///<remarks>Defaults to 1990-01-01 00:00:00.000 if not available, an example: 2012-02-19 13:10:00.000</remarks>
    ///<permission>Standard</permission>
    public DateTime actualTimeGMTScheduled { get; set; }

    /// <summary>
    ///The type of surface that is being run on
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are All Weather or Turf </remarks>
    ///<permission>Standard</permission>
    public string raceSurfaceChar { get; set; }

    /// <summary>
    ///The one character representation of the type of surface of the race
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are A or T </remarks>
    ///<permission>Standard</permission>
    public string raceSurfaceName { get; set; }

    /// <summary>
    ///The type of racing
    ///</summary>
    ///<value>Title Case</value>
    ///<returns>String</returns>
    ///<remarks>Values are Flat, Hurdle, Chase, Bumper</remarks>
    ///<permission>Standard</permission>
    public string raceType { get; set; }

    /// <summary>
    ///The number of complete furlongs the race will be run over
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>an example: 8</remarks>
    ///<permission>Standard</permission>
    public int distanceFurlongs { get; set; }

    /// <summary>
    ///The number of yards the race will be run over in addition to the furlongs
    ///</summary>
    ///<value>May be 0 if the race is at an exact furlong distance</value>
    ///<returns>Integer</returns>
    ///<remarks>an example: 212</remarks>
    ///<permission>Standard</permission>
    public int distanceYards { get; set; }

    /// <summary>
    ///The race distance in decimal furlongs
    ///</summary>
    ///<value>Above 0.0</value>
    ///<returns>Decimal</returns>
    ///<remarks>an example: 8.51</remarks>
    ///<permission>Standard</permission>
    public decimal distance { get; set; }

    /// <summary>
    ///The race distance as text format
    ///</summary>
    ///<value>Display text for the distance of the race</value>
    ///<returns>String</returns>
    ///<remarks>an example: 1M 4F 50y</remarks>
    ///<permission>Standard</permission>
    public string distanceText { get; set; }

    /// <summary>
    ///The full name of the race
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String</returns>
    ///<remarks>An Example: BETFRED CHELTENHAM GOLD CUP (Grade 1)</remarks>
    ///<permission>Standard</permission>
    public string raceTitle { get; set; }

    /// <summary>
    ///The short name of the race
    ///</summary>
    ///<value>Title case</value>
    ///<returns>String</returns>
    ///<remarks>An Example: Cheltenham Gold Cup</remarks>
    ///<permission>Standard</permission>
    public string raceTitleShort { get; set; }

    /// <summary>
    ///The Timeform going of the race
    ///</summary>
    ///<value>"" if no report is available, char if it is</value>
    ///<returns>String</returns>
    ///<remarks>Gd/Frm, Good, Soft, Gd/Sft</remarks>
    ///<permission>Standard</permission>
    public string going { get; set; }

    /// <summary>
    ///The Timeform single character going abbreviation
    ///</summary>
    ///<value>"" if no report is available, char if it is</value>
    ///<returns>String(1)</returns>
    ///<remarks>m, g, s, d</remarks>
    ///<permission>Standard</permission>
    public string goingAbbrev { get; set; }

    /// <summary>
    ///The official going of the race
    ///</summary>
    ///<value>"" if no report is available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no report, </remarks>
    ///<permission>Standard</permission>
    public string goingOfficial { get; set; }

    /// <summary>
    ///The maximum age eligibility of the race
    ///</summary>
    ///<value>Can be an integer or a char</value>
    ///<returns>String(1)</returns>
    ///<remarks>If integer then that is the explicit age max, + = no max age, O - limited to the min age</remarks>
    ///<permission>Standard</permission>
    public string eligibilityAgeMax { get; set; }

    /// <summary>
    ///The minimum age eligibility of the race
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>An example: 4</remarks>
    ///<permission>Standard</permission>
    public int? eligibilityAgeMin { get; set; }

    /// <summary>
    ///The number of runners either currently entered or that ran in the race
    ///</summary>
    ///<value>If 0, the value hasnt yet been calculated, above 0 if it has</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - runners not yet known, an example: 5</remarks>
    ///<permission>Standard</permission>
    public int numberOfRunners { get; set; }

    /// <summary>
    ///The number of horses that will qualify as being placed under standard bookmaking terms
    ///</summary>
    ///<value>Above 0</value>
    ///<returns>Integer</returns>
    ///<remarks>An example: 3</remarks>
    ///<permission>Standard</permission>
    public int numberOfPlaces { get; set; }

    /// <summary>
    ///Details of a sex limit on the race
    ///</summary>
    ///<value>"" if no limit is involved</value>
    ///<returns>String(2)</returns>
    ///<remarks>"" means there is no sex limit, F - fillies, M - mares, C - colts, G - Geldered</remarks>
    ///<permission>Standard</permission>
    public string eligibilitySexLimit { get; set; }

    /// <summary>
    ///The current status of the race
    ///</summary>
    ///<value>"" - no status available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no status available, an example: "Weighed In"</remarks>
    ///<permission>Standard</permission>
    public string resultsStatus { get; set; }

    /// <summary>
    ///Character value for the type of race
    ///</summary>
    ///<value>Upper Case</value>
    ///<returns>String(1)</returns>
    ///<remarks>N - Bumper, F - Flat, H - Hurdle, C - Chase</remarks>
    ///<permission>Standard</permission>
    public string raceTypeChar { get; set; }

    /// <summary>
    ///Representation of the flavour of race (handicap, group etc)
    ///</summary>
    ///<value>"" If not available, upper case if it is</value>
    ///<returns>String(2)</returns>
    ///<remarks>"" - not available, an example: H</remarks>
    ///<permission>Standard</permission>
    public string raceCode { get; set; }

    /// <summary>
    ///Total prize fund of the race
    ///</summary>
    ///<value>0.0 if not available, above 0.0 if it is </value>''
    ///<returns>Decimal</returns>
    ///<remarks>0.0 - not available, an example 9000.00</remarks>
    ///<permission>Standard</permission>
    public decimal prizeFund { get; set; }

    /// <summary>
    ///Prize fund for the winner of the race
    ///</summary>
    ///<value>0.0 if not available, above 0.0 if it is </value>
    ///<returns>Decimal</returns>
    ///<remarks>0.0 - not available, an example 9000.00</remarks>
    ///<permission>Standard</permission>
    public decimal prizeFundWinner { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 5 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw1 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 4 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw2 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 3 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw3 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race 2 runnings ago
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw4 { get; set; }

    /// <summary>
    ///The Timeform Rating of Winner of the race last time
    ///</summary>
    ///<value>0 if not available, above 0 if it is</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - not available, an example: 134</remarks>
    ///<permission>Premium</permission>
    public int trw5 { get; set; }

    /// <summary>
    ///The Timeform Weight For Age
    ///</summary>
    ///<value>"" - not available</value>
    ///<returns>String</returns>
    ///<remarks>Example: TWFA 3 9-4 TWFA 4 9-13 </remarks>
    ///<permission>Premium</permission>
    public string tfwfa { get; set; }

    /// <summary>
    ///The premium post-race review of the race
    ///</summary>
    ///<value>"" if the comment hasn't been written, Title Case if it has</value>
    ///<returns>String</returns>
    ///<remarks>"" - no comment written, an example: "Winner impressive, others disapointed"</remarks>
    ///<permission>Premium</permission>
    public string perspectiveComment { get; set; }

    /// <summary>
    ///The Timeform Analyst pre-race predictions for the race
    ///</summary>
    ///<value>"" if not available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: HURRICANE FLY looks certain to take this race</remarks>
    ///<permission>Standard</permission>
    public string analystVerdict { get; set; }

    /// <summary>
    ///The comment for flat racing which is based on analysis of previous races at this course over the same distance
    ///</summary>
    ///<value>"" if not available, Title Case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Strongly favours low</remarks>
    ///<permission>Standard</permission>
    public string drawComment { get; set; }

    /// <summary>
    ///Information about in play records at the course
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Dundalk ranked 18 of 21 flat Irish courses for horses beaten at 1.01</remarks>
    ///<permission>Standard</permission>
    public string ipHintsGeneral { get; set; }

    /// <summary>
    ///Information about horses in the race based on their past trading and run style information
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Buywise traded at 1.50 on its last start when losing but travelling strongly in rear</remarks>
    ///<permission>Standard</permission>
    public string ipHintsPriceRunStyle { get; set; }


    /// <summary>
    ///Information about horses in the race based on their past trading information
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Milarrow traded at more than 5 times BSP twice when winning during its last 5 starts., Celtus has traded at 50% or less of BSP 4 times on its last 5 starts. </remarks>
    ///<permission>Standard</permission>
    public string iPriceHistory { get; set; }

    /// <summary>
    ///A prediction on the likely pace of the race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Strongly contested </remarks>
    ///<permission>Standard</permission>
    public string ipHintsOverallPace { get; set; }

    /// <summary>
    ///A prediction on the likely shape of the race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: Kruzhlinin is unlikely to get things its own way close up and could therefore prove vulnerable in the finish: With no shortage of likely pace-forcers, Parsnip Pete may have a running style that suits. </remarks>
    ///<permission>Standard</permission>
    public string ipHintsSpecificPace { get; set; }

    /// <summary>
    ///An integer value of the race state
    ///</summary>
    ///<value>0 - unknown, above 0 is a valid state</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - unknown, an example 22 - weighed in</remarks>
    ///<permission>Standard</permission>
    public int raceStateId { get; set; }

    /// <summary>
    ///For handicaps the lower handicap mark for a horse to qualify to run
    ///</summary>
    ///<value>0 if not applicable, above 0 for a valid mark</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - limit not applicable, an example 130</remarks>
    ///<permission>Standard</permission>
    public int ratingLimitLower { get; set; }

    /// <summary>
    ///For handicaps the upper handicap mark for a horse to qualify to run
    ///</summary>
    ///<value>0 if not applicable, above 0 for a valid mark</value>
    ///<returns>Integer</returns>
    ///<remarks>0 - limit not applicable, an example 130</remarks>
    ///<permission>Standard</permission>
    public int ratingLimitUpper { get; set; }

    /// <summary>
    ///The class of race
    ///</summary>
    ///<value>"" if not available, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" if not available, an example 2</remarks>
    ///<permission>Standard</permission>
    public string raceClass { get; set; }

    /// <summary>
    ///The highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat1 { get; set; }

    /// <summary>
    ///The second highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat2 { get; set; }

    /// <summary>
    ///The third highest priority stat for the race
    ///</summary>
    ///<value>"" if not available, title case if it is with standard formatting values - # separate, * bold</value>
    ///<returns>String</returns>
    ///<remarks>"" - not available, an example: #34%#James Doyle's strike rate on favourites since 01/01/2009 (rides *TIME CHECK*)</remarks>
    ///<permission>Standard</permission>
    public string smartStat3 { get; set; }

    /// <summary>
    ///The Betfair market ID of this race if mapped
    ///</summary>
    ///<value>"" if not mapped to a Betfair market, title case if it is</value>
    ///<returns>String</returns>
    ///<remarks>"" - no market mapped, an example: 12321 </remarks>
    ///<permission>Standard</permission>
    public string bfMarketId { get; set; }

    /// <summary>
    ///The finishing time of the race in seconds
    ///</summary>
    ///<value>0 if the time in unavailable</value>
    ///<returns>Decimal</returns>
    ///<remarks>0 - if no time available, an example: 130.52</remarks>
    ///<permission>Standard</permission>
    public decimal finishingTime { get; set; }

    /// <summary>
    ///The time it took the leader at the point the sectional was taken to complete the race
    ///</summary>
    ///<value>0 if the time in unavailable</value>
    ///<returns>Decimal</returns>
    ///<remarks>0 - if unavailable, measured in seconds to two decimal places</remarks>
    ///<permission>Premium</permission>
    public decimal leaderSectional { get; set; }

    public decimal winnerSectional { get; set; }

    public decimal distanceSectional { get; set; }

    public decimal sectionalFinishingTime { get; set; }

    // Additional fields MDB 2016-01-08
    public int courseExtraId { get; set; }
    public string distanceType { get; set; }
    public string tv { get; set; }
    public int perspectiveNumber { get; set; }

    public int hotRace { get; set; }

    public string raceId { get; set; }

    public int numberOfFencesJumped { get; set; }

    /// <summary>
    ///Internal Publish Flag
    ///</summary>
    ///<value>Internal Use Only</value>
    ///<returns>Integer</returns>
    ///<remarks>Internal Use Only</remarks>
    ///<permission>Standard</permission>
    [JsonIgnore]
    public int publishFlag { get; set; }


    public string paceMapsIdealPosition { get; set; }

    public string resultNotes { get; set; }


    public virtual meeting meeting { get; set; }
    public virtual List<entry> entries { get; set; } = new List<entry>();
    public virtual List<performance> performances { get; set; } = new List<performance>();
}
//种族
modelBuilder.Entity(Entity=>
{
实体。ToTable(“race_standard_vw”);
entity.HasKey(x=>x.meetingDate);
entity.HasKey(x=>x.courseId);
entity.HasKey(x=>x.raceNumber);
});
公开课竞赛:伊拉克人
{
/// 
///比赛日期和部分主键
///
///非空
///日期
///比赛日期,格式为yyyy mm dd
///标准
公共日期时间会议日期{get;set;}
/// 
///比赛发生的球场的ID,并且是主键的一部分
///
///0以上
///整数
///主键(PK)的一部分
///标准
public int courseId{get;set;}
/// 
///比赛号码,是主键的一部分
///
///1或以上
///整数
///主键(PK)的一部分
///标准
公共整数竞赛号{get;set;}
/// 
///课程全名
///
///大写字母
///串
///例如:海多克公园
///标准
公共字符串courseName{get;set;}
/// 
///三字课程缩写
///
///产权案
///字符串(3)
///例如:干草
///标准
公共字符串courseabrev{get;set;}
/// 
///比赛预定开始的时间,即比赛正在进行的地方
///
///yyyy-mm-ddd时长:时长:秒长:毫秒
///日期时间
///默认值为1990-01-01 00:00:00.000(如果不可用),例如:2012-02-19 13:10:00.000
///标准
public DateTime startTimeLocalScheduled{get;set;}
/// 
///比赛预定在格林尼治标准时间开始的时间
///
///yyyy-mm-ddd时长:时长:秒长:毫秒
///日期时间
///默认值为1990-01-01 00:00:00.000(如果不可用),例如:2012-02-19 13:10:00.000
///标准
public DateTime StartItemsScheduled{get;set;}
/// 
///比赛实际开始的时间,比赛正在进行的地方
///
///yyyy-mm-ddd时长:时长:秒长:毫秒
///日期时间
///默认值为1990-01-01 00:00:00.000(如果不可用),例如:2012-02-19 13:10:00.000
///标准
public DateTime actualTimeLocalScheduled{get;set;}
/// 
///比赛在格林尼治标准时间实际开始的时间
///
///yyyy-mm-ddd时长:时长:秒长:毫秒
///日期时间
///默认值为1990-01-01 00:00:00.000(如果不可用),例如:2012-02-19 13:10:00.000
///标准
公共日期时间实际时间表{get;set;}
/// 
///正在运行的曲面的类型
///
///产权案
entity.HasKey(x => x.meetingDate);
entity.HasKey(x => x.courseId);
entity.HasKey(x => x.raceNumber);
entity.HasKey(x => new { x.courseId, x.meetingDate });
entity.HasKey(x => new { x.meetingDate, x.courseId, x.raceNumber });