public static MailQueue Push(MailQueue mail) { using(var db = ObjectProvider.CreateDB()) { db.MailQueues.Add(mail); db.SaveChanges(); return mail; } }
public void SendMessage(MailMessage message) { var mail = new MailQueue() { From = message.From.Address, To = message.To[0].Address, Subject = message.Subject, Content = message.Body }; MailQueue.Push(mail); }
public void SendMessage(MailMessage message) { var mail = new MailQueue() { From = message.From.Address, To = message.To[0].Address, Subject = message.Subject, Content = message.Body }; _unitOfWork.MailQueues.Add(mail); _unitOfWork.Complete(); }
public void SendMessage(MailMessage message) { var mail = new MailQueue() { From = message.From.Address, To = message.To[0].Address, Subject = message.Subject, Content = message.Body }; _unitOfWork.MailQueues.Add(mail); _unitOfWork.Complete(); }
public void Add(MailQueue mailQueue) { _raisinsDb.MailQueues.Add(mailQueue); }