Dalibor Votruba 9c128cfc24 db schema model v.1.0.10 4 rokov pred
..
Entity 9c128cfc24 db schema model v.1.0.10 4 rokov pred
Repository cce850ef52 add UserGetAPIKeyCommand 4 rokov pred
Data.csproj 4f7f091549 Update packages, set icons to all projects 4 rokov pred
KeyScalarDate.cs b0c5447b1d Initial commit (structure + current version) 4 rokov pred
bo_dll.ico 4f7f091549 Update packages, set icons to all projects 4 rokov pred
readme.txt 9c128cfc24 db schema model v.1.0.10 4 rokov pred

readme.txt

Upd: 2.8.2021

To reverse update:
- Set Data project as Startup Project
- Ensure if solution is buildable - backup Entity folder
- Open PM (Package Manager Console from View menu)
- Run following command (in case localdb use (localdb)\\MSSQLLocalDB)
Scaffold-DbContext "Server=use (localdb)\\MSSQLLocalDB;Database=BO;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Entity -Force
- Go to file BOContext.cs and replace class declaration as : public partial class BOContext : DataDomain
- Delete constructor BoContext()
- replace in all entities // public long Id { get; set; } -> // // public long Id { get; set; }
- replace in BOContext.cs occurency [ln cca:173]:
entity.HasOne(d => d.Workspace)
.WithMany(p => p.BillingInfos)
.HasForeignKey(d => d.WorkspaceId)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("REL_BillingInfo_Workspace");
to:

//entity.HasOne(d => d.Workspace)
// .WithMany(p => p.BillingInfos)
// .HasForeignKey(d => d.WorkspaceId)
// .OnDelete(DeleteBehavior.ClientSetNull)
// .HasConstraintName("REL_BillingInfo_Workspace");

- replace in BOContext.cs occurency [ln cca:1069]:
modelBuilder.Entity(entity =>
{
entity.HasNoKey();

to:

modelBuilder.Entity(entity =>
{
// entity.HasNoKey();

- replace in BOContext.cs occurency [ln cca:1139]:
entity.HasOne(d => d.BillingInfo)
.WithMany(p => p.Workspaces)
.HasForeignKey(d => d.BillingInfoId)
.HasConstraintName("REL_Workspace_BillingInfo");

to:

//entity.HasOne(d => d.BillingInfo)
// .WithMany(p => p.Workspaces)
// .HasForeignKey(d => d.BillingInfoId)
// .HasConstraintName("REL_Workspace_BillingInfo");