fix
This commit is contained in:
parent
d0f630ccea
commit
814fe65535
@ -1,4 +1,6 @@
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace ASC.Core.Common.EF.Model.Mail
|
||||
{
|
||||
public class GreyListingWhiteList
|
||||
@ -6,4 +8,21 @@ namespace ASC.Core.Common.EF.Model.Mail
|
||||
public string Comment { get; set; }
|
||||
public string Source { get; set; }
|
||||
}
|
||||
|
||||
public static class GreyListingWhiteListExtension
|
||||
{
|
||||
public static ModelBuilderWrapper AddGreyListingWhiteList(this ModelBuilderWrapper modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.Add(MySqlAddGreyListingWhiteList, Provider.MySql);
|
||||
|
||||
return modelBuilder;
|
||||
}
|
||||
|
||||
public static void MySqlAddGreyListingWhiteList(this ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<GreyListingWhiteList>()
|
||||
.HasKey(e => e.Comment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace ASC.Core.Common.EF.Model
|
||||
{
|
||||
public class Regions
|
||||
@ -8,4 +10,23 @@ namespace ASC.Core.Common.EF.Model
|
||||
|
||||
public string ConnectionString { get; set; }
|
||||
}
|
||||
|
||||
public static class RegionsExtension
|
||||
{
|
||||
public static ModelBuilderWrapper AddRegions(this ModelBuilderWrapper modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.Add(MySqlAddRegions, Provider.MySql);
|
||||
|
||||
return modelBuilder;
|
||||
}
|
||||
|
||||
public static void MySqlAddRegions(this ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Regions>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Region);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user