Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created May 1, 2022 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/db16083b1449b85c47423f9965d806fe to your computer and use it in GitHub Desktop.
Save xximjasonxx/db16083b1449b85c47423f9965d806fe to your computer and use it in GitHub Desktop.
public abstract class Vertex
{
public abstract string Label { get; }
}
public class Person : Vertex
{
public override string Label => "Person";
public Guid Id { get; set; }
public string FirstName { get; set; }
public string partitionKey => FirstName.Substring(0, 1);
}
public abstract class Edge
{
public Guid Id { get; set; }
public abstract string Label { get; }
}
public class SiblingOf : Edge
{
public override string Label => "Sibling Of";
}
public class ChildOf : Edge
{
public override string Label => "Child Of";
}
public class MarriedTo : Edge
{
public override string Label => "Married To";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment