Updates IDomain to include language ISO code so we can save a lookup

This commit is contained in:
Shannon
2015-08-04 15:42:44 +02:00
parent 05d84c6673
commit bc7a31d791
5 changed files with 87 additions and 6 deletions

View File

@@ -8,5 +8,10 @@ namespace Umbraco.Core.Models
string DomainName { get; set; }
int? RootContentId { get; set; }
bool IsWildcard { get; }
/// <summary>
/// Readonly value of the language ISO code for the domain
/// </summary>
string LanguageIsoCode { get; }
}
}

View File

@@ -23,5 +23,11 @@ namespace Umbraco.Core.Models.Rdbms
[Column("domainName")]
public string DomainName { get; set; }
/// <summary>
/// Used for a result on the query to get the associated language for a domain if there is one
/// </summary>
[ResultColumn("languageISOCode")]
public string IsoCode { get; set; }
}
}

View File

@@ -14,6 +14,12 @@ namespace Umbraco.Core.Models
_domainName = domainName;
}
public UmbracoDomain(string domainName, string languageIsoCode)
: this(domainName)
{
LanguageIsoCode = languageIsoCode;
}
private int? _contentId;
private int? _languageId;
private string _domainName;
@@ -70,9 +76,9 @@ namespace Umbraco.Core.Models
get { return string.IsNullOrWhiteSpace(DomainName) || DomainName.StartsWith("*"); }
}
public string IsoCode
{
get { throw new NotImplementedException(); }
}
/// <summary>
/// Readonly value of the language ISO code for the domain
/// </summary>
public string LanguageIsoCode { get; internal set; }
}
}