コード例 #1
0
        public async Task <MasterGraph> Create(string title, int order, MasterGraphCategories masterGraphCategory)
        {
            var props = new CommonGraphProp
            {
                EnText = title
            };
            var graph = new MasterGraph
            {
                Id    = Guid.NewGuid(),
                Order = order,
                MasterGraphCategoryId = (int)masterGraphCategory,
                Props = props
            };
            var coreGraph = new Graph
            {
                Id            = Guid.NewGuid(),
                Title         = "Core Graph",
                GraphTypeId   = (int)GraphTypes.Core,
                MasterGraphId = graph.Id,
                Data          = "" // this might need changing
            };

            graph.Graphs.Add(coreGraph);
            this.dbContext.MasterGraphs.Add(graph);
            await this.dbContext.SaveInfoAndChangesAsync();

            return(graph);
        }
コード例 #2
0
 public UcCreateMasterGraphRequest(string title, int order, MasterGraphCategories masterGraphCategory)
 {
     this.Title = title;
     this.Order = order;
     this.MasterGraphCategory = masterGraphCategory;
 }