Mapping.cs 484 B

123456789101112131415
  1. using Oreo.FaultLog.Models;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using System.Data.Entity.Infrastructure.Annotations;
  4. using System.Data.Entity.ModelConfiguration;
  5. namespace Oreo.FaultLog.DatabaseEngine
  6. {
  7. public class FaultLogsMap : EntityTypeConfiguration<FaultLogs>
  8. {
  9. public FaultLogsMap()
  10. {
  11. this.Property(o => o.Id).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true }));
  12. }
  13. }
  14. }