/// <summary> /// Creates a new instance. /// </summary> public ApplicationAccess(StakeholderLogin login) { Guard.ArgumentNotNull(login, nameof(login)); this.DateLastModified = DateTime.UtcNow; this.UserName = ""; this.StakeholderLoginId = login.Id; this.Id = SeqGuid.Create(); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="device">Gets the device the login or group has access to.</param> /// <param name="deviceModelDependency">Gets the application/device model the login has access to.</param> /// <param name="login"></param> public ApplicationAccess(Device device, DeviceModelDependency deviceModelDependency, StakeholderLogin login) { Guard.ArgumentNotNull(device, nameof(device)); Guard.ArgumentNotNull(deviceModelDependency, nameof(deviceModelDependency)); Guard.ArgumentNotNull(login, nameof(login)); this.DeviceId = device.Id; this.DeviceModelDependencyId = deviceModelDependency.Id; this.StakeholderLoginId = login.Id; this.DateLastModified = DateTime.UtcNow; this.UserName = ""; }