Performance improvements, refactoring of multi-tenant support, split Alias and Tenant entities for cleaner separation of concerns, create an additional site during installation for demonstratng multitenancy
This commit is contained in:
41
Oqtane.Shared/Models/Alias.cs
Normal file
41
Oqtane.Shared/Models/Alias.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Alias
|
||||
{
|
||||
public int AliasId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Scheme { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return Scheme + "://" + Name;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("/"))
|
||||
{
|
||||
return Name.Substring(Name.IndexOf("/") + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user