Editor povezava na db

This commit is contained in:
David Štaleker
2024-02-27 07:27:47 +01:00
parent 4df426dc10
commit e92956075f
24 changed files with 1033 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ZpcBulletinBoard.Classes;
namespace ZpcBulletinBoard.Models.Editor
{
@@ -29,9 +30,11 @@ namespace ZpcBulletinBoard.Models.Editor
[Display(Name = "Razmerje")]
public RatioEnum Ratio { get; set; }
[NotMapped] public string RatioString => Ratio.GetAttributeOfType<DisplayAttribute>().Name ?? "";
// InvoicePart
[InverseProperty("BulletinBoard")]
public virtual ICollection<Note> Notes { get; set; }
public virtual ICollection<BulletinBoardPage> Pages { get; set; }
}
}