/// <summary> /// 构造函数 /// </summary> /// <param name="factory">AbstractMessageFactory</param> public Message(AbstractMessageFactory factory) { DateTime pt = DateTime.Now; _insertMessage = factory.CreateMessage(); _messageModel = factory.CreateMessageModel(); }
public abstract string Insert(AbstractMessageModel amm);
public override string Insert(AbstractMessageModel amm) { return("afsd"); }
/// <summary> /// 插入Message /// </summary> /// <param name="amm">AbstractMessageModel</param> /// <returns></returns> public override string Insert(AbstractMessageModel amm) { return("Sql方式插入Message。帐号:" + amm.UserId + ";内容:" + amm.Message + ";时间:" + amm.PublishTime.ToString()); }