Class BacklinkAttribute
An attribute that indicates that the property it decorates is the inverse end of a relationship.
Namespace: Realms
Assembly: Realm.dll
Syntax
public class BacklinkAttribute : Attribute
Examples
class Dog : RealmObject
{
// One to many relationship with Person.Dogs
public Person Owner { get; set; }
}
class Person : RealmObject
{
[Backlink(nameof(Dog.Owner))]
public IQueryable<Dog> Dogs { get; }
// Many to many relationship with Hobby.PeopleWithThatHobby
public IList<Hobby> Hobbies { get; }
}
class Hobby : RealmObject
{
[Backlink(nameof(Person.Hobbies))]
public IQueryable<Person> PeopleWithThatHobby { get; }
}
Constructors
| Improve this Doc View SourceBacklinkAttribute(String)
Initializes a new instance of the BacklinkAttribute class.
Declaration
public BacklinkAttribute(string property)
Parameters
Type | Name | Description |
---|---|---|
String | property | The property that is on the other end of the relationship. |