با سلام.
کلاس زیر رو دارم:
public partial class Tbl_Lesson { public int LessonID { get; set; } public string LessonName { get; set; } public byte LessonTypeID { get; set; } public Nullable<byte> SemesterID { get; set; } public Nullable<byte> UnitTypeID { get; set; } public Nullable<byte> PracticalHours { get; set; } public Nullable<byte> TheoreticalHours { get; set; } public string LessonPlanFile { get; set; } public string PlanVolumeFile { get; set; } public string CourseGuideFile { get; set; } public string KurykulumFile { get; set; } public Nullable<byte> EducationalGroupID { get; set; } public Nullable<byte> UnitCount { get; set; } public virtual Tbl_EducationalGroup Tbl_EducationalGroup { get; set; } public virtual Tbl_LessonType Tbl_LessonType { get; set; } public virtual Tbl_Semester Tbl_Semester { get; set; } public virtual Tbl_UnitType Tbl_UnitType { get; set; } }
در ویو نیز چنین نوشتم:
@Html.TextBoxFor(x => x.LessonName, new { @id = "StudentFamily", @class = "form-control", style = "font-family:'W_YEKAN_0';text-align:right;width:88%;height:40px;float:right;font-size:20px" }) @Html.ValidationMessageFor(x => x.LessonName, string.Empty, new { style = "margin-right:20px;float:right;font-weight:bold;" })
و در هنگام اجرای ویو با پیغام زیر مواجه می شوم:
The associated metadata type for type 'University.Models.Tbl_Lesson' contains the following unknown properties or fields: LessonTypeName. Please make sure that the names of these members match the names of the properties on the main type.
لطفا راهنمایی نمایید
با تشکر
مشکل حل شد
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)