public async Task <bool> UpdateAsync(UpdateAuditMessage message) { using (var context = _contextFactory.CreateDataContext()) { var entity = await context.AuditMessages.FirstOrDefaultAsync(sms => sms.MessageId == message.MessageId); if (entity == null) { return(false); } entity.SentTimestamp = message.SentTimestamp; entity.DeliveryStatus = message.DeliveryStatus; entity.DeliveryComment = message.DeliveryComment; context.Update(entity); await context.SaveChangesAsync(); return(true); } }
public Task <bool> UpdateAsync(UpdateAuditMessage message) { return(_auditMessageRepository.UpdateAsync(message)); }