Пример #1
0
        public async Task <string> AddUserVertex(UserVertex User)
        {
            UserVertex v = new UserVertex()
            {
                AboutMe                = User.AboutMe ?? "",
                Allergies              = User.Allergies ?? "",
                Answer                 = User.Answer ?? "",
                BackgroundUrl          = User.BackgroundUrl ?? "",
                City                   = User.City ?? "",
                CreateDate             = DateTime.UtcNow,
                Cusines                = User.Cusines ?? "",
                Diets                  = User.Diets ?? "",
                Email                  = User.Email ?? "",
                Facebook               = User.Facebook ?? "",
                FullName               = User.FullName ?? "",
                id                     = User.UserName.ToLower(),
                Instagram              = User.Instagram ?? "",
                IsFacebookLinkVisible  = false,
                IsInstagramVisible     = false,
                IsPinterestLinkVisible = false,
                IsTwitterLinkVisible   = false,
                LastActivityDate       = DateTime.UtcNow,
                LastUpdateDate         = DateTime.UtcNow,
                PhotoPath              = User.PhotoPath ?? "",
                Pintrest               = User.Pintrest ?? "",
                PostalCode             = User.PostalCode ?? "",
                Question               = User.Question ?? "",
                State                  = User.State ?? "",
                Twitter                = User.Twitter ?? "",
                UserName               = User.UserName
            };
            await client.Add(v).SubmitAsync();

            return(v.id);
        }