public void AddEducation(string title, string editor, string content, bool isLocal, bool isSeen)
 {
     try
     {
         Education addModel = new Education()
         {
             Id = Guid.NewGuid(),
             Title = StringHelper.LimitLength(title, 100),
             Editor = StringHelper.LimitLength(title, 100),
             Content = content,
             CreateTime = DateTime.Now,
             IsLocal = isLocal,
             IsSeen = isSeen
         };
         db.AddToEducations(addModel);
         db.SaveChanges();
     }
     catch(Exception ex)
     {
         throw ex;
     }
 }
 /// <summary>
 /// 创建新的 Education 对象。
 /// </summary>
 /// <param name="id">Id 属性的初始值。</param>
 /// <param name="createTime">CreateTime 属性的初始值。</param>
 /// <param name="editor">Editor 属性的初始值。</param>
 /// <param name="content">Content 属性的初始值。</param>
 /// <param name="title">Title 属性的初始值。</param>
 /// <param name="isSeen">IsSeen 属性的初始值。</param>
 /// <param name="isLocal">IsLocal 属性的初始值。</param>
 public static Education CreateEducation(global::System.Guid id, global::System.DateTime createTime, global::System.String editor, global::System.String content, global::System.String title, global::System.Boolean isSeen, global::System.Boolean isLocal)
 {
     Education education = new Education();
     education.Id = id;
     education.CreateTime = createTime;
     education.Editor = editor;
     education.Content = content;
     education.Title = title;
     education.IsSeen = isSeen;
     education.IsLocal = isLocal;
     return education;
 }
 /// <summary>
 /// 用于向 Educations EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToEducations(Education education)
 {
     base.AddObject("Educations", education);
 }