/// <summary> /// Criar Log de um email /// </summary> /// <param name="newEntity"></param> /// <returns></returns> public EmailLogEntity Create(EmailLogEntity newEntity) { using (ModelContext context = new ModelContext()) { newEntity.SendTime = DateTime.UtcNow; context.EmailLogs.Attach(newEntity); context.Entry(newEntity).State = System.Data.Entity.EntityState.Added; context.SaveChanges(); } return(newEntity); }
public Task <int> InsertAsync(EmailLogEntity entity, CancellationToken cancellationToken = default) { return(_asyncRepository.InsertAsync(data: entity, cancellationToken: cancellationToken)); }