Guest User

Untitled

a guest
Dec 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. # Display Sweet
  2.  
  3. > Please design a simple schema with Entity Framework based on given scenario.
  4. > 1. Navigation is a structure that stores components in a tree form. First level has at most 8 components, each node at first level contains at most 7 sub-components.
  5. > 2. Components json stores the components that used in Navigation struct. Two entities maintain the relation through the Id of the component.
  6.  
  7. ## Questions
  8. > 1. The implementation of Navigation entity class
  9. > 2. The implementation of Component entity class
  10. > 3. The design of relationship between two entities
  11. > 4. To implement an endpoint to generate the output against given structure.
  12. > 5. Please provide a set of seeding data for your implementation
  13.  
  14. ## Navigation Json
  15.  
  16. ```.json
  17. {
  18. "navigation":{
  19. "2199fb7e-b249-4a22-acab-221a677cee9b":{
  20. "children":{
  21. "cff20369-bb02-4720-b1e9-8870f54d0073":{
  22. "index":0,
  23. "parentId":"2199fb7e-b249-4a22-acab-221a677cee9b",
  24. "template":"templateString",
  25. "type":"typeString"
  26. },
  27. "c4e14101-9713-463a-b028-deb23c9f38bf":{
  28. "index":1,
  29. "parentId":"2199fb7e-b249-4a22-acab-221a677cee9b",
  30. "template":"templateString",
  31. "type":"typeString"
  32. }
  33. },
  34. "index":0,
  35. "type":"string"
  36. },
  37. "6c673c1f-8345-4d5c-9652-cca03d56a3ac":{
  38. "children":{
  39. "85c703dd-4887-4e9d-a1b7-14022958860b":{
  40. "parentId":"6c673c1f-8345-4d5c-9652-cca03d56a3ac",
  41. "template":"templateString",
  42. "type":"typeString"
  43. }
  44. },
  45. "index":0,
  46. "type":"string"
  47. }
  48. }
  49. }
  50.  
  51. ```
  52.  
  53. ## Components Json
  54.  
  55. ```.json
  56. {
  57. "components":{
  58. "cff20369-bb02-4720-b1e9-8870f54d0073":{
  59. "data":{
  60. "0":{
  61. "asset":"urlString",
  62. "caption":{
  63. "language_0":"string",
  64. "language_1":"string"
  65. }
  66. },
  67. "1":{
  68. "asset":"urlString",
  69. "caption":{
  70. "language_0":"string",
  71. "language_1":"string"
  72. }
  73. }
  74. },
  75. "type":"string"
  76. },
  77. "c4e14101-9713-463a-b028-deb23c9f38bf":{
  78. "data":{
  79. "0":{
  80. "styles":{
  81. "0":{
  82. "asset":"urlString",
  83. "name":{
  84. "language_0":"string",
  85. "language_1":"string"
  86. }
  87. },
  88. "1":{
  89. "asset":"urlString",
  90. "nmae":{
  91. "language_0":"string",
  92. "language_1":"string"
  93. }
  94. }
  95. },
  96. "type":"typeString"
  97. }
  98. }
  99. },
  100. "85c703dd-4887-4e9d-a1b7-14022958860b":{
  101. "data":{
  102. "companyLogo":"urlString",
  103. "mainImage":"urlString"
  104. },
  105. "type":"string"
  106. }
  107. }
  108. }
  109.  
  110. ```
Add Comment
Please, Sign In to add comment