a migration

dotnet-7.0
Paul Schneider 2 years ago
parent efcb1620d6
commit 42dba1b6c1
7 changed files with 94 additions and 87 deletions

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@ -15,35 +16,42 @@ namespace Yavsc.Models.Messaging
/// The title. /// The title.
/// </summary> /// </summary>
[Required, Display(Name = "Titre")] [Required, Display(Name = "Titre")]
[StringLength(1024)]
public string title { get; set; } public string title { get; set; }
/// <summary> /// <summary>
/// The body. /// The body.
/// </summary> /// </summary>
[StringLength(512)]
[Required, Display(Name = "Corps")] [Required, Display(Name = "Corps")]
public string body { get; set; } public string body { get; set; }
/// <summary> /// <summary>
/// The icon. /// The icon.
/// </summary> /// </summary>
[StringLength(512)]
[Display(Name = "Icône")] [Display(Name = "Icône")]
public string icon { get; set; } public string icon { get; set; }
/// <summary> /// <summary>
/// The sound. /// The sound.
/// </summary> /// </summary>
[StringLength(512)]
[Display(Name = "Son")] [Display(Name = "Son")]
public string sound { get; set; } public string sound { get; set; }
/// <summary> /// <summary>
/// The tag. /// The tag.
/// </summary> /// </summary>
[StringLength(512)]
[Display(Name = "Tag")] [Display(Name = "Tag")]
public string tag { get; set; } public string tag { get; set; }
/// <summary> /// <summary>
/// The color. /// The color.
/// </summary> /// </summary>
[StringLength(512)]
[Display(Name = "Couleur")] [Display(Name = "Couleur")]
public string color { get; set; } public string color { get; set; }
/// <summary> /// <summary>
/// The click action. /// The click action.
/// </summary> /// </summary>
[StringLength(512)]
[Required, Display(Name = "Label du click")] [Required, Display(Name = "Label du click")]
public string click_action { get; set; } public string click_action { get; set; }
@ -54,6 +62,7 @@ namespace Yavsc.Models.Messaging
/// <c>administration</c> : for admins ... /// <c>administration</c> : for admins ...
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[StringLength(512)]
public string Target { get; set; } public string Target { get; set; }
public Notification() public Notification()

@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Yavsc.Models.Relationship;
using Yavsc.Models.Relationship; using Yavsc.Models.Relationship;
using Yavsc.Models.Identity; using Yavsc.Models.Identity;
using Yavsc.Models.Chat; using Yavsc.Models.Chat;
@ -13,7 +9,6 @@ using Yavsc.Models.Relationship;
using Yavsc.Models.Access; using Yavsc.Models.Access;
namespace Yavsc.Models namespace Yavsc.Models
{ {
public class ApplicationUser : IdentityUser, IBaseTrackedEntity public class ApplicationUser : IdentityUser, IBaseTrackedEntity
{ {

@ -97,10 +97,11 @@ namespace Yavsc.Models.Billing
return $"facture-{bcode}-{Id}{ack}"; return $"facture-{bcode}-{Id}{ack}";
} }
[Display(Name = "PaymentId")] [ForeignKey("Regularisation")]
public string PaymentId { get; set; } public string PaymentId { get; set; }
[ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")] [Display(Name = "Acquittement de la facture")]
public virtual PayPalPayment Regularisation { get; set; } public virtual PayPalPayment Regularisation { get; set; }
} }

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq; using System.Linq;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json; using Newtonsoft.Json;
using Yavsc.Abstract.Identity.Security; using Yavsc.Abstract.Identity.Security;
using Yavsc.Attributes.Validation; using Yavsc.Attributes.Validation;
@ -34,11 +35,11 @@ namespace Yavsc.Models.Blog
public string Title { get; set; } public string Title { get; set; }
[Display(Name="Identifiant de l'auteur")] [Display(Name="Identifiant de l'auteur")]
[ForeignKey("Author")]
public string AuthorId { get; set; } public string AuthorId { get; set; }
[Display(Name="Auteur")] [Display(Name="Auteur")]
[ForeignKey("AuthorId"),JsonIgnore] public virtual ApplicationUser Author { set; get; }
public ApplicationUser Author { set; get; }
[Display(Name="Visible")] [Display(Name="Visible")]
public bool Visible { get; set; } public bool Visible { get; set; }

@ -27,10 +27,10 @@ namespace Yavsc.Models.Workflow
[YaStringLength(512)] [YaStringLength(512)]
[Display(Name = "Code du parent")] [Display(Name = "Code du parent")]
[ForeignKey("Parent")]
public string ParentCode { get; set; } public string ParentCode { get; set; }
[ForeignKey("ParentCode"), JsonIgnore] [Display(Name = "Activité parent"), JsonIgnore]
[Display(Name = "Activité parent")]
public virtual Activity Parent { get; set; } public virtual Activity Parent { get; set; }
[InverseProperty("Parent"), JsonIgnore] [InverseProperty("Parent"), JsonIgnore]

@ -36,19 +36,24 @@ namespace Yavsc.Migrations
name: "FK_BlogTag_Tag_TagId", name: "FK_BlogTag_Tag_TagId",
table: "BlogTag"); table: "BlogTag");
migrationBuilder.DropPrimaryKey(
name: "PK_Blog",
table: "BlogPost");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Activity_Activity_ParentCode", name: "FK_Activity_Activity_ParentCode",
table: "Activity"); table: "Activity");
migrationBuilder.DropForeignKey(
name: "FK_AspNetUsers_Location_PostalAddressId",
table: "AspNetUsers");
/* migrationBuilder.DropPrimaryKey(
name: "PK_Blog",
table: "BlogPost");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_AccountBalance_AspNetUsers_UserId", name: "FK_AccountBalance_AspNetUsers_UserId",
table: "AccountBalance"); */ table: "AccountBalance"); */
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Announce_AspNetUsers_OwnerId", name: "FK_Announce_AspNetUsers_OwnerId",
table: "Announce"); table: "Announce");
@ -76,45 +81,39 @@ namespace Yavsc.Migrations
name: "FK_AspNetUsers_BankIdentity_BankInfoId", name: "FK_AspNetUsers_BankIdentity_BankInfoId",
table: "AspNetUsers"); table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_AspNetUsers_Location_PostalAddressId",
table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_Ban_AspNetUsers_TargetId",
table: "Ban");*/
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ApplicationUser_BankIdentity_BankInfoId", name: "FK_Ban_AspNetUsers_TargetId",
table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_ApplicationUser_Location_PostalAddressId",
table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_Ban_ApplicationUser_TargetId",
table: "Ban"); table: "Ban");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId", name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact"); table: "BalanceImpact");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BlackListed_AspNetUsers_OwnerId", name: "FK_BlackListed_AspNetUsers_OwnerId",
table: "BlackListed"); table: "BlackListed");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BlackListed_AspNetUsers_UserId", name: "FK_BlackListed_AspNetUsers_UserId",
table: "BlackListed"); table: "BlackListed");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BlogPost_AspNetUsers_AuthorId", name: "FK_BlogPost_AspNetUsers_AuthorId",
table: "BlogPost");*/ table: "BlogPost");
/* migrationBuilder.DropForeignKey(
name: "FK_ApplicationUser_BankIdentity_BankInfoId",
table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_ApplicationUser_Location_PostalAddressId",
table: "AspNetUsers");
migrationBuilder.DropForeignKey(
name: "FK_Ban_ApplicationUser_TargetId",
table: "Ban");
*/
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BlogTrad_AspNetUsers_TraducerId", name: "FK_BlogTrad_AspNetUsers_TraducerId",
table: "BlogTrad");*/ table: "BlogTrad");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_BrusherProfile_PerformerProfile_UserId", name: "FK_BrusherProfile_PerformerProfile_UserId",
@ -127,26 +126,24 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Bug_Feature_FeatureId", name: "FK_Bug_Feature_FeatureId",
table: "Bug"); table: "Bug");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ChatConnection_AspNetUsers_ApplicationUserId", name: "FK_ChatConnection_AspNetUsers_ApplicationUserId",
table: "ChatConnection"); table: "ChatConnection");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ChatRoom_AspNetUsers_OwnerId", name: "FK_ChatRoom_AspNetUsers_OwnerId",
table: "ChatRoom"); table: "ChatRoom");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ChatRoomAccess_AspNetUsers_UserId", name: "FK_ChatRoomAccess_AspNetUsers_UserId",
table: "ChatRoomAccess");*/ table: "ChatRoomAccess");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ChatRoomAccess_ChatRoom_ChannelName", name: "FK_ChatRoomAccess_ChatRoom_ChannelName",
table: "ChatRoomAccess"); table: "ChatRoomAccess");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_CircleMember_AspNetUsers_MemberId", name: "FK_CircleMember_AspNetUsers_MemberId",
table: "CircleMember"); */ table: "CircleMember");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_CircleMember_Circle_CircleId", name: "FK_CircleMember_Circle_CircleId",
@ -163,39 +160,39 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_CommandLine_Estimate_EstimateId", name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine"); table: "CommandLine");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Comment_AspNetUsers_AuthorId", name: "FK_Comment_AspNetUsers_AuthorId",
table: "Comment");*/ table: "Comment");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Contact_PostalAddress_AddressId", name: "FK_Contact_PostalAddress_AddressId",
table: "Contact"); table: "Contact");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_CoWorking_AspNetUsers_WorkingForId", name: "FK_CoWorking_AspNetUsers_WorkingForId",
table: "CoWorking");*/ table: "CoWorking");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_CoWorking_PerformerProfile_PerformerId", name: "FK_CoWorking_PerformerProfile_PerformerId",
table: "CoWorking"); table: "CoWorking");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId", name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId",
table: "DeviceDeclaration"); table: "DeviceDeclaration");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_DimissClicked_AspNetUsers_UserId", name: "FK_DimissClicked_AspNetUsers_UserId",
table: "DimissClicked");*/ table: "DimissClicked");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_DimissClicked_Notification_NotificationId", name: "FK_DimissClicked_Notification_NotificationId",
table: "DimissClicked"); table: "DimissClicked");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Estimate_AspNetUsers_ClientId", name: "FK_Estimate_AspNetUsers_ClientId",
table: "Estimate");*/ table: "Estimate");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId", name: "FK_Estimate_PerformerProfile_OwnerId",
@ -205,17 +202,17 @@ namespace Yavsc.Migrations
name: "FK_Estimate_RdvQuery_CommandId", name: "FK_Estimate_RdvQuery_CommandId",
table: "Estimate"); table: "Estimate");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_GitRepositoryReference_AspNetUsers_OwnerId", name: "FK_GitRepositoryReference_AspNetUsers_OwnerId",
table: "GitRepositoryReference"); */ table: "GitRepositoryReference");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode", name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery"); table: "HairCutQuery");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairCutQuery_AspNetUsers_ClientId", name: "FK_HairCutQuery_AspNetUsers_ClientId",
table: "HairCutQuery"); */ table: "HairCutQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairCutQuery_BrusherProfile_SelectedProfileUserId", name: "FK_HairCutQuery_BrusherProfile_SelectedProfileUserId",
@ -229,10 +226,10 @@ namespace Yavsc.Migrations
name: "FK_HairCutQuery_Location_LocationId", name: "FK_HairCutQuery_Location_LocationId",
table: "HairCutQuery"); table: "HairCutQuery");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairCutQuery_PayPalPayment_PaymentId", name: "FK_HairCutQuery_PayPalPayment_PaymentId",
table: "HairCutQuery"); */ table: "HairCutQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId", name: "FK_HairCutQuery_PerformerProfile_PerformerId",
@ -242,17 +239,17 @@ namespace Yavsc.Migrations
name: "FK_HairMultiCutQuery_Activity_ActivityCode", name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery"); table: "HairMultiCutQuery");
/* migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairMultiCutQuery_AspNetUsers_ClientId", name: "FK_HairMultiCutQuery_AspNetUsers_ClientId",
table: "HairMultiCutQuery"); */ table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairMultiCutQuery_Location_LocationId", name: "FK_HairMultiCutQuery_Location_LocationId",
table: "HairMultiCutQuery"); table: "HairMultiCutQuery");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairMultiCutQuery_PayPalPayment_PaymentId", name: "FK_HairMultiCutQuery_PayPalPayment_PaymentId",
table: "HairMultiCutQuery"); */ table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
@ -293,7 +290,7 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_InstrumentRating_PerformerProfile_OwnerId", name: "FK_InstrumentRating_PerformerProfile_OwnerId",
table: "InstrumentRating"); table: "InstrumentRating");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_LiveFlow_AspNetUsers_OwnerId", name: "FK_LiveFlow_AspNetUsers_OwnerId",
table: "LiveFlow"); table: "LiveFlow");
@ -304,7 +301,7 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_PerformerProfile_AspNetUsers_PerformerId", name: "FK_PerformerProfile_AspNetUsers_PerformerId",
table: "PerformerProfile");*/ table: "PerformerProfile");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId", name: "FK_PerformerProfile_Location_OrganizationAddressId",
@ -313,10 +310,10 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Project_Activity_ActivityCode", name: "FK_Project_Activity_ActivityCode",
table: "Project"); table: "Project");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Project_AspNetUsers_ClientId", name: "FK_Project_AspNetUsers_ClientId",
table: "Project"); */ table: "Project");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Project_GitRepositoryReference_GitId", name: "FK_Project_GitRepositoryReference_GitId",
@ -337,26 +334,26 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode", name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery"); table: "RdvQuery");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_RdvQuery_AspNetUsers_ClientId", name: "FK_RdvQuery_AspNetUsers_ClientId",
table: "RdvQuery"); */ table: "RdvQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_RdvQuery_Location_LocationId", name: "FK_RdvQuery_Location_LocationId",
table: "RdvQuery"); table: "RdvQuery");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_RdvQuery_PayPalPayment_PaymentId", name: "FK_RdvQuery_PayPalPayment_PaymentId",
table: "RdvQuery"); */ table: "RdvQuery");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId", name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery"); table: "RdvQuery");
/*
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_Schedule_AspNetUsers_OwnerId", name: "FK_Schedule_AspNetUsers_OwnerId",
table: "Schedule"); */ table: "Schedule");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd",
@ -2438,7 +2435,7 @@ namespace Yavsc.Migrations
name: "UserModified", name: "UserModified",
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: false, nullable: true,
defaultValue: "", defaultValue: "",
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
@ -2448,7 +2445,7 @@ namespace Yavsc.Migrations
name: "UserCreated", name: "UserCreated",
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: false, nullable: true,
defaultValue: "", defaultValue: "",
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
@ -2458,7 +2455,7 @@ namespace Yavsc.Migrations
name: "Title", name: "Title",
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: false, nullable: true,
defaultValue: "", defaultValue: "",
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
@ -2468,7 +2465,7 @@ namespace Yavsc.Migrations
name: "Photo", name: "Photo",
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: false, nullable: true,
defaultValue: "", defaultValue: "",
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
@ -2478,7 +2475,7 @@ namespace Yavsc.Migrations
name: "Lang", name: "Lang",
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: false, nullable: true,
defaultValue: "", defaultValue: "",
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
@ -2499,7 +2496,7 @@ namespace Yavsc.Migrations
table: "Blogspot", table: "Blogspot",
type: "text", type: "text",
nullable: true, nullable: true,
defaultValue: "", defaultValue: null,
oldClrType: typeof(string), oldClrType: typeof(string),
oldType: "text", oldType: "text",
oldNullable: true); oldNullable: true);
@ -2681,6 +2678,9 @@ namespace Yavsc.Migrations
name: "PK_CircleMembers", name: "PK_CircleMembers",
table: "CircleMembers", table: "CircleMembers",
columns: new[] { "MemberId", "CircleId" }); columns: new[] { "MemberId", "CircleId" });
migrationBuilder.DropPrimaryKey(
"PK_BlogPost","Blogspot"
);
migrationBuilder.AddPrimaryKey( migrationBuilder.AddPrimaryKey(
name: "PK_Blogspot", name: "PK_Blogspot",

@ -77,6 +77,7 @@ namespace Yavsc.Models
} }
builder.Entity<Activity>().Property(a=>a.ParentCode).IsRequired(false); builder.Entity<Activity>().Property(a=>a.ParentCode).IsRequired(false);
builder.Entity<BlogPost>().HasOne(p => p.Author).WithMany(a => a.Posts);
} }
// this is not a failback procedure. // this is not a failback procedure.

Loading…