/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Persistence/MassTransit.EntityFrameworkIntegration/EntityFrameworkIntegration/Audit/AuditMapping.cs
36 строк
1 KB
Chris Patterson
Integration of all external packages into MassTransit, split out into Abstractions, Middleware, and the core MassTransit assembly.
22 янв 2022, 18:24
22 янв 2022, 18:24
b5b4f50
Код
Авторство
О чём код?
namespace MassTransit.EntityFrameworkIntegration.Audit { using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; public class AuditMapping : EntityTypeConfiguration<AuditRecord> { public AuditMapping(string tableName) { ToTable(tableName); HasKey(x => x.AuditRecordId) .Property(x => x.AuditRecordId) .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity); Property(x => x.ContextType); Property(x => x.MessageId); Property(x => x.InitiatorId); Property(x => x.ConversationId); Property(x => x.CorrelationId); Property(x => x.RequestId); Property(x => x.SentTime); Property(x => x.SourceAddress); Property(x => x.DestinationAddress); Property(x => x.ResponseAddress); Property(x => x.FaultAddress); Property(x => x.InputAddress); Property(x => x.MessageType); Property(x => x._headers).HasColumnName("Headers"); Property(x => x._custom).HasColumnName("Custom"); Property(x => x._message).HasColumnName("Message"); } } }