25 lines
720 B
C#
25 lines
720 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Data.Entity.ModelConfiguration;
|
|
|
|
namespace IntegrationTests.Models.Mapping
|
|
{
|
|
public class SystemSettingMap : EntityTypeConfiguration<SystemSetting>
|
|
{
|
|
public SystemSettingMap()
|
|
{
|
|
// Primary Key
|
|
this.HasKey(t => t.Id);
|
|
|
|
// Properties
|
|
this.Property(t => t.Value)
|
|
.HasMaxLength(4000);
|
|
|
|
// Table & Column Mappings
|
|
this.ToTable("SystemSettings");
|
|
this.Property(t => t.Id).HasColumnName("Id");
|
|
this.Property(t => t.Type).HasColumnName("Type");
|
|
this.Property(t => t.Value).HasColumnName("Value");
|
|
}
|
|
}
|
|
}
|