示例#1
0
        public async Task <string> AddGroupPost(GroupUpdateVertex Update, string User)
        {
            Update.id       = Guid.NewGuid().ToString();
            Update.Title    = Update.Title ?? "";
            Update.Body     = Update.Body ?? "";
            Update.Url      = Update.Url ?? new List <string>();
            Update.ImageUrl = Update.ImageUrl ?? new List <string>();
            await client.Add(Update).SubmitAsync();

            await client.SubmitAsync($"g.V('{User.ToLower()}').addE('Update').to(g.V('{Update.id}'))");

            await client.SubmitAsync($"g.V('{Update.GroupId}').addE('Update').to(g.V('{Update.id}'))");

            return(Update.id);
        }
 public GroupUpdateModel()
 {
     Update   = new GroupUpdateVertex();
     Comments = new List <GroupUpdateCommentVertex>();
 }