Пример #1
0
        public async Task <TwilioIncomingMessageCallback> SaveIncomingMessageCallback(TwilioIncomingMessageCallback record)
        {
            using (var db = new Data.SMSDataModel())
            {
                if (record.Id == Guid.Empty)
                {
                    record.Id = Guid.NewGuid();
                    db.TwilioIncomingMessageCallbacks.Add(record);
                }
                else
                {
                    db.TwilioIncomingMessageCallbacks.Attach(record);
                }

                await db.SaveChangesAsync();

                return(record);
            }
        }
Пример #2
0
 public async Task <TwilioIncomingMessageCallback> SaveIncomingMessageCallback(TwilioIncomingMessageCallback record)
 {
     record.CreateDate = DateTime.UtcNow;
     return(await TwilioDataProvider.SaveIncomingMessageCallback(record));
 }