Mapping.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Oreo.FileMan.Models;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Data.Entity.Infrastructure.Annotations;
  6. using System.Data.Entity.ModelConfiguration;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace Oreo.FileMan.DatabaseEngine
  11. {
  12. public class UsnFilesMap : EntityTypeConfiguration<UsnFiles>
  13. {
  14. public UsnFilesMap()
  15. {
  16. this.Property(o => o.Id).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true }));
  17. }
  18. }
  19. public class UsnDrivesMap : EntityTypeConfiguration<UsnDrives>
  20. {
  21. public UsnDrivesMap()
  22. {
  23. this.Property(o => o.Id).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true }));
  24. }
  25. }
  26. public class BackupPathsMap : EntityTypeConfiguration<BackupPaths>
  27. {
  28. public BackupPathsMap()
  29. {
  30. this.Property(o => o.Id).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true }));
  31. }
  32. }
  33. public class BackupFilesMap : EntityTypeConfiguration<BackupFiles>
  34. {
  35. public BackupFilesMap()
  36. {
  37. this.Property(o => o.Id).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true }));
  38. }
  39. }
  40. }