/// <summary>
 /// 用于向 MessageTables EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToMessageTables(MessageTable messageTable)
 {
     base.AddObject("MessageTables", messageTable);
 }
 public string SendMessageToAcquirer(Message message)
 {
     MessageTable table = new MessageTable()
     {
         FromId=message.FromId,
         IsSee=false,
         ToId=message.ToId,
         Time=DateTime.Now.ToShortDateString()+" "+DateTime.Now.ToShortTimeString(),
         Message=message.MessageContent,
     };
     db.MessageTables.AddObject(table);
     db.SaveChanges();
     return "OK";
 }
 /// <summary>
 /// 创建新的 MessageTable 对象。
 /// </summary>
 /// <param name="id">Id 属性的初始值。</param>
 /// <param name="fromId">FromId 属性的初始值。</param>
 /// <param name="toId">ToId 属性的初始值。</param>
 /// <param name="isSee">IsSee 属性的初始值。</param>
 /// <param name="message">Message 属性的初始值。</param>
 /// <param name="time">Time 属性的初始值。</param>
 public static MessageTable CreateMessageTable(global::System.Int32 id, global::System.Int32 fromId, global::System.Int32 toId, global::System.Boolean isSee, global::System.String message, global::System.String time)
 {
     MessageTable messageTable = new MessageTable();
     messageTable.Id = id;
     messageTable.FromId = fromId;
     messageTable.ToId = toId;
     messageTable.IsSee = isSee;
     messageTable.Message = message;
     messageTable.Time = time;
     return messageTable;
 }