mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
774 B
26 lines
774 B
using System;
|
|
using Volo.Abp.MongoDB;
|
|
|
|
namespace Volo.Abp.AuditLogging.MongoDB
|
|
{
|
|
public static class AbpAuditLoggingMongoDbContextExtensions
|
|
{
|
|
public static void ConfigureAuditLogging(
|
|
this IMongoModelBuilder builder,
|
|
Action<AuditLoggingMongoModelBuilderConfigurationOptions> optionsAction = null)
|
|
{
|
|
Check.NotNull(builder, nameof(builder));
|
|
|
|
var options = new AuditLoggingMongoModelBuilderConfigurationOptions(
|
|
AbpAuditLoggingDbProperties.DbTablePrefix
|
|
);
|
|
|
|
optionsAction?.Invoke(options);
|
|
|
|
builder.Entity<AuditLog>(b =>
|
|
{
|
|
b.CollectionName = options.CollectionPrefix + "AuditLogs";
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|