/// <summary> /// 将Course类转换为COURSE类 /// </summary> /// <param name="course">要转换的Course类</param> /// <returns>转换后对应的COURSE类实例</returns> public COURSE ConvertCourseToCOURSE(Course course) { COURSE ResultCOURSE = new COURSE(); ResultCOURSE.course_id = course.Course_id; ResultCOURSE.course_intro = course.Course_intro; ResultCOURSE.course_name = course.Course_name; ResultCOURSE.course_price = course.Course_price; ResultCOURSE.course_robot_link = course.Course_robot_link; ResultCOURSE.course_begin_date = course.Course_begin_date; ResultCOURSE.course_isDeleted = course.Course_isDeleted; return ResultCOURSE; }
/// <summary> /// 将从数据库中获取的COURSE类转换为Course类 /// </summary> /// <param name="course">要转换的COURSE类实例</param> /// <returns>转换完毕的对应Course类实例</returns> public Course ConvertCOURSEToCourse(COURSE course) { Course result = new Course(); result.Course_id = course.course_id; result.Course_intro = course.course_intro; result.Course_name = course.course_name; result.Course_price = course.course_price; result.Course_robot_link = course.course_robot_link; result.Course_begin_date = course.course_begin_date; result.Course_isDeleted = course.course_isDeleted; result.Course_timestamp = course.course_timestamp; return result; }
/// <summary> /// 创建新的 COURSE 对象。 /// </summary> /// <param name="c_id">c_id 属性的初始值。</param> /// <param name="course_id">course_id 属性的初始值。</param> /// <param name="course_name">course_name 属性的初始值。</param> /// <param name="course_intro">course_intro 属性的初始值。</param> /// <param name="course_price">course_price 属性的初始值。</param> /// <param name="course_robot_link">course_robot_link 属性的初始值。</param> /// <param name="course_begin_date">course_begin_date 属性的初始值。</param> /// <param name="course_isDeleted">course_isDeleted 属性的初始值。</param> /// <param name="course_timestamp">course_timestamp 属性的初始值。</param> public static COURSE CreateCOURSE(global::System.Int64 c_id, global::System.Guid course_id, global::System.String course_name, global::System.String course_intro, global::System.Double course_price, global::System.String course_robot_link, global::System.DateTime course_begin_date, global::System.Boolean course_isDeleted, global::System.Byte[] course_timestamp) { COURSE cOURSE = new COURSE(); cOURSE.c_id = c_id; cOURSE.course_id = course_id; cOURSE.course_name = course_name; cOURSE.course_intro = course_intro; cOURSE.course_price = course_price; cOURSE.course_robot_link = course_robot_link; cOURSE.course_begin_date = course_begin_date; cOURSE.course_isDeleted = course_isDeleted; cOURSE.course_timestamp = course_timestamp; return cOURSE; }
/// <summary> /// 用于向 COURSE EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToCOURSE(COURSE cOURSE) { base.AddObject("COURSE", cOURSE); }