Use sql tables to create family diagram

how to use sql tables to create family diagram?
I am working on MVC 5 and using EF.

You need to get the data to the browser so that it is in memory as JavaScript Objects in Arrays. There are many ways to do that, but they have nothing to do with client-side libraries such as GoJS.

// here’s the family data
var nodeDataArray = [];
@foreach (var i in Model)
{

      @:nodeDataArray.push("@i")
  }

  // create the model for the family tree
  myDiagram.model = new go.TreeModel(nodeDataArray);

here i am using this but getting error " Uncaught Error: Model.nodeDataArray must only contain Objects, not: 1{ Name = Jain, ParentId = }"

That error is correct. You need to write out code to construct the data so that it is equivalent to what is demonstrated at the end of Get Started with GoJS.

do you have any example in which create dynamic diagram using sql database …

Try the videos in our YouTube channel. But they are really old and out-of-date.