/// <summary> /// Adds new message to database /// </summary> /// <param name="message"></param> public void Add(Message message) { message.DateCreated = DateTime.UtcNow; using (var session = GetSession()) { using (var transaction = session.BeginTransaction()) { session.Save(message); transaction.Commit(); } } }
public Message Post(Message message) { Repository.Add(message); return message; }