[#34] First step of not using Bio as Attribute

This commit is contained in:
2024-02-19 22:14:47 +01:00
parent 092c5788a4
commit abbb5a12a6
19 changed files with 219 additions and 59 deletions

View File

@ -17,7 +17,7 @@ namespace Elwig.Models.Entities {
public string VtrgId { get; set; }
[Column("cultid")]
public string CultId { get; set; }
public string? CultId { get; set; }
[Column("area")]
public int Area { get; set; }
@ -47,7 +47,7 @@ namespace Elwig.Models.Entities {
public virtual AreaComType AreaComType { get; private set; }
[ForeignKey("CultId")]
public virtual WineCult WineCult { get; private set; }
public virtual WineCult? WineCult { get; private set; }
[ForeignKey("KgNr")]
public virtual WbKg Kg { get; private set; }
@ -57,7 +57,7 @@ namespace Elwig.Models.Entities {
public int SearchScore(IEnumerable<string> keywords) {
var list = new string?[] {
WineCult.Name, Kg.AtKg.Name, Rd.Name, GstNr, Comment,
WineCult?.Name, Kg.AtKg.Name, Rd.Name, GstNr, Comment,
}.ToList();
return Utils.GetSearchScore(list, keywords);
}