[AcceptVerbs("Get")]
[HttpGet]
[Route("GetData")]
public List<ClassDiagram> GetData()
{
DiagramEntities entity = new DiagramEntities();
List<ClassDiagram> classData = entity.ClassDiagrams.ToList();
return classData;
}
|
mounted() {
//retrieve server side API
axios.get("http://localhost:57270/api/home/getdata")
.then(response => {
if(response.data.length > 0) {
//iterate the database class object
for( var i = 0; i < response.data.length; i++) {
var data = response.data[i];
var classData = JSON.parse(data.ClassObject);
// create a node
this.nodes.push({
id: classData.name, offsetX: 400, offsetY: 200 * i,
shape: {
type: 'UmlClassifier',
class: classData,
classifier: 'Class'
}
})
}
}
})
} |
Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Details: No virtual path information available.
Query |
Response | |
many thanks you for your reply. i will explain my situation.
İ want to continue my project with your datagrid component or Umlclassdiagram.
İ think datagrid is the best way but actually i ask for support.
İn Uml i have properties like name type and scope. But i want to add a third custom propertie. İs it possible?
With my requirement: "also i want to know is it possible to add some more Attributes to a Class from an external button like your component "datagrid ? "
İ want handle the new attributes or methods, also classname dynamically at realtime. İn Datagrid i have the option toolbar with editsettings (buttons add, delete, update..). How can i do the same for umlclassdiagram. |
We have checked your query and you can achieve your requirement by using the below way. We have prepared a sample in datagrid where the attribute is set initially by using customAttributes property and it is set dynamically by using the setAttribute method. Please refer the following code snippet, sample link and documentation link.
[App.vue]
| |
İ have try to run the sampleUml in vs code and the samplewebapi in visual Studio.
İ get the exception from webapı:
System.Web.HttpException
The resource cannot be found.
Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Details: No virtual path information available.
Exception stack trace:
|
We fetch class diagram data from database in GetData method. Once you have run the webApi sample, please navigate to http://localhost:57270/api/home/getdata. |