public ChatLogViewModel(ChatLog log) : this() { Id = log.Id; DateCreated = log.DateCreated; Messages = log.GetUserMessages(null); }
public ChatLogViewModel(ChatLog log, string userId) : this() { Messages = log.GetUserMessages(userId); }
public ActionResult Delete(ChatLog model) { string errorText; TempData["Error"] = context.Delete(model, out errorText) ? null : errorText; return RedirectToAction("Index"); }
public void AddMessageToLog(ChatMessage message) { if (Log == null) { Log = new ChatLog(Id); } Log.Messages.Add(message); }