Feature #42: Active Directory Interop Upgrade

AD Interop moved to Disco.Services; Supports multi-domain environments,
sites, and searching restricted with OUs.
This commit is contained in:
Gary Sharp
2014-04-10 17:58:04 +10:00
parent b841c6b2c0
commit db73cc1a12
218 changed files with 6383 additions and 2535 deletions
+22 -2
View File
@@ -22,8 +22,8 @@ namespace Disco.Models.Repository
public int DeviceProfileId { get; set; }
public int? DeviceBatchId { get; set; }
[StringLength(24)]
public string ComputerName { get; set; }
[StringLength(50), Column("ComputerName")]
public string DeviceDomainId { get; set; }
public string AssignedUserId { get; set; }
public DateTime? LastNetworkLogonDate { get; set; }
@@ -67,6 +67,26 @@ namespace Disco.Models.Repository
return this.SerialNumber;
}
[NotMapped]
public string ComputerName
{
get
{
var index = DeviceDomainId.IndexOf('\\');
return index < 0 ? DeviceDomainId : DeviceDomainId.Substring(index + 1);
}
}
[NotMapped]
public string ComputerDomainName
{
get
{
var index = DeviceDomainId.IndexOf('\\');
return index < 0 ? null : DeviceDomainId.Substring(0, index);
}
}
public enum DecommissionReasons
{
EndOfLife = 0,