Class ReferenceByIdModel
Represents a model containing a reference identified by an ID.
Inheritance
object
Namespace: Umbraco.Cms.Api.Management.ViewModels
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public sealed class ReferenceByIdModel
Constructors
View SourceReferenceByIdModel()
Initializes a new instance of the ReferenceByIdModel class with default values.
Declaration
public ReferenceByIdModel()
ReferenceByIdModel(Guid)
Initializes a new instance of the ReferenceByIdModel class with the specified identifier.
Declaration
public ReferenceByIdModel(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The unique identifier for the reference. |
Properties
View SourceId
Gets or sets the unique identifier.
Declaration
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
Methods
View SourceReferenceOrNull(Guid?)
Creates a ReferenceByIdModel instance for the specified ID, or returns null if the ID is null.
Declaration
public static ReferenceByIdModel? ReferenceOrNull(Guid? id)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid? | id | The nullable System.Guid to create the reference from. |
Returns
| Type | Description |
|---|---|
| ReferenceByIdModel | A ReferenceByIdModel instance if |