TableKey.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. 
  2. //------------------------------------------------------------------------------
  3. // <auto-generated>
  4. // This code was generated from a template.
  5. //
  6. // Manual changes to this file may cause unexpected behavior in your application.
  7. // Manual changes to this file will be overwritten if the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. using System.Collections.Generic;
  11. namespace EMISOnline.Entities
  12. {
  13. public class TableKeyDictionary
  14. {
  15. private static Dictionary<string, string> items;
  16. public static Dictionary<string, string> Items
  17. {
  18. get { return items; }
  19. }
  20. static TableKeyDictionary()
  21. {
  22. items = new Dictionary<string, string>();
  23. items.Add("CF_Campus", "CampusID");
  24. items.Add("CF_Classmajor", "ClassmajorID");
  25. items.Add("CF_College", "CollegeID");
  26. items.Add("CF_Department", "DepartmentID");
  27. items.Add("CF_Facultymajor", "FacultymajorID");
  28. items.Add("CF_Grademajor", "GrademajorID");
  29. items.Add("CF_Recruitstudents", "UserID");
  30. items.Add("CF_Schoolyear", "SchoolyearID");
  31. items.Add("CF_Staff", "UserID");
  32. items.Add("CF_StaffProfile", "UserID");
  33. items.Add("CF_Student", "UserID");
  34. items.Add("CF_StudentContact", "UserID");
  35. items.Add("CF_StudentContrast", "StudentContrastID");
  36. items.Add("CF_StudentRole", "RoleID");
  37. items.Add("CF_University", "UniversityID");
  38. items.Add("Coursework", "ID");
  39. items.Add("CourseworkAnswer", "ID");
  40. items.Add("CourseworkResult", "ID");
  41. items.Add("EM_CourseChapter", "CourseChapterID");
  42. items.Add("EM_CourseChapter_Video", "CourseVideoID");
  43. items.Add("EM_Coursematerial", "CoursematerialID");
  44. items.Add("EM_CoursematerialExtend", "CoursematerialID");
  45. items.Add("EM_CourseStudyStatus", "CourseStudyStatusID");
  46. items.Add("EM_CourseVideo", "CourseVideoID");
  47. items.Add("EM_EducationMission", "EducationMissionID");
  48. items.Add("EM_EducationMissionClass", "EducationMissionClassID");
  49. items.Add("EM_EducationMissionClass_CF_Classmajor", "EducationMissionClassID");
  50. items.Add("EM_EducationMissionClassTeachingSetting", "EducationMissionClassID");
  51. items.Add("EM_EducationSchedulingClass", "EducationSchedulingClassID");
  52. items.Add("EM_EducationSchedulingClass_CF_Student", "EducationSchedulingClassID");
  53. items.Add("EM_ExecutableFreeSelectionCouse", "ExecutableFreeSelectionCouseID");
  54. items.Add("EM_ExecutableFreeSelectionCouseTeachingSetting", "ExecutableFreeSelectionCouseID");
  55. items.Add("EM_ExecutableOptionalCourse", "ExecutableOptionalCourseID");
  56. items.Add("EM_ExecutableOptionalCourseTeachingSetting", "ExecutableOptionalCourseID");
  57. items.Add("EM_ExecutablePlan", "ExecutablePlanID");
  58. items.Add("EM_ExecutablePlanTeachingSetting", "ExecutablePlanID");
  59. items.Add("EM_FreeSelectionCouse", "FreeSelectionCouseID");
  60. items.Add("EM_FTPVideo", "FTPVideoID");
  61. items.Add("EM_MissionClassTeacher", "MissionClassTeacherID");
  62. items.Add("EM_OptionalCoursePlan", "OptionalCourseID");
  63. items.Add("EM_SpecialtyCourse", "SpecialtyCourseID");
  64. items.Add("EM_SpecialtyCourseTeachingSetting", "SpecialtyCourseID");
  65. items.Add("ER_ScoreRule", "ScoreRuleID");
  66. items.Add("ER_TeacherScore", "TeacherScoreID");
  67. items.Add("Exam_Log", "Id");
  68. items.Add("ExamineeAnswer", "ID");
  69. items.Add("ExamPaper", "ID");
  70. items.Add("ExamResult", "ID");
  71. items.Add("ExamResult_backup_20120913", "ID");
  72. items.Add("ExamSetting_Examiner", "ID");
  73. items.Add("ExamWarning", "ID");
  74. items.Add("MSreplication_objects", "object_name");
  75. items.Add("MSreplication_subscriptions", "publisher");
  76. items.Add("MSsavedforeignkeycolumns", "program_name");
  77. items.Add("MSsavedforeignkeyextendedproperties", "program_name");
  78. items.Add("MSsavedforeignkeys", "program_name");
  79. items.Add("MSsnapshotdeliveryprogress", "session_token");
  80. items.Add("MSsubscription_agents", "id");
  81. items.Add("Sys_Dictionary", "DictionaryCode");
  82. items.Add("Sys_DictionaryItem", "DictionaryItemID");
  83. items.Add("Sys_FunctionCode", "FunctionCode");
  84. items.Add("Sys_LoginCount", "UserID");
  85. items.Add("Sys_MailVerifyCode", "UserID");
  86. items.Add("Sys_Menu", "MenuNo");
  87. items.Add("Sys_Role", "RoleID");
  88. items.Add("Sys_User", "UserID");
  89. items.Add("Sys_User_Sys_Role", "UserID");
  90. items.Add("test_base_param", "base_param_id");
  91. items.Add("test_base_param_type", "base_param_parent_id");
  92. items.Add("test_base_question_type", "base_question_type_id");
  93. items.Add("test_comm_param_set", "comm_param_set_id");
  94. items.Add("test_comm_set", "comm_set_id");
  95. items.Add("test_exchange", "id");
  96. items.Add("test_keyword", "test_keyword_id");
  97. items.Add("test_onlinetest", "onlinetest_id");
  98. items.Add("test_onlinetest_man", "ID");
  99. items.Add("test_onlinetest_manshow", "ID");
  100. items.Add("test_paper", "test_paper_id");
  101. items.Add("test_paper_guide", "test_paper_guide_id");
  102. items.Add("test_paper_question_set", "test_paper_question_set_id");
  103. items.Add("test_paper_question_set_fortest", "test_paper_question_set_id");
  104. items.Add("test_question", "test_question_Id");
  105. items.Add("test_question_administrator", "test_question_administrator_id");
  106. items.Add("test_question_file", "file_id");
  107. items.Add("test_question_keyword", "test_question_keyword_id");
  108. items.Add("test_question_libary", "test_question_libary_id");
  109. items.Add("test_question_provid_answer", "provid_answer_id");
  110. items.Add("v_question", "test_question_Id");
  111. items.Add("V_StudentEducationMissionClass", "EducationMissionClassID");
  112. items.Add("v_test_question", "test_question_Id");
  113. items.Add("VTestQestion", "test_question_Id");
  114. }
  115. public static string GetKeyName<TEntity>(TEntity entity)
  116. {
  117. string tableName = entity.GetType().Name;
  118. return items[tableName];
  119. }
  120. public static string GetKeyName<TEntity>()
  121. {
  122. string tableName = typeof(TEntity).Name;
  123. return items[tableName];
  124. }
  125. }
  126. }