readme.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. Upd: 2.8.2021
  2. To reverse update:
  3. - Set Data project as Startup Project
  4. - Ensure if solution is buildable - backup Entity folder
  5. - Open PM (Package Manager Console from View menu)
  6. - Run following command
  7. Scaffold-DbContext "Server=(local);Database=BO;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Entity -Force
  8. - Go to file BOContext.cs and replace class declaration as : public partial class BOContext : DataDomain
  9. - replace in all entities // // // public long Id { get; set; } -> // // // // public long Id { get; set; }
  10. - replace in BOContext.cs occurency [ln cca:1069]:
  11. modelBuilder.Entity<UserWorkspace>(entity =>
  12. {
  13. entity.HasNoKey();
  14. to:
  15. modelBuilder.Entity<UserWorkspace>(entity =>
  16. {
  17. // entity.HasNoKey();
  18. - replace in BOContext.cs occurency [ln cca:1139]:
  19. entity.HasOne(d => d.BillingInfo)
  20. .WithMany(p => p.Workspaces)
  21. .HasForeignKey(d => d.BillingInfoId)
  22. .HasConstraintName("REL_Workspace_BillingInfo");
  23. to:
  24. //entity.HasOne(d => d.BillingInfo)
  25. // .WithMany(p => p.Workspaces)
  26. // .HasForeignKey(d => d.BillingInfoId)
  27. // .HasConstraintName("REL_Workspace_BillingInfo");