Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
I need some help. I am trying to create some nodes on Umbraco programatically, and everything works fine. The only issue is that when I make this call...
ApplicationContext.Current.Services.ContentService.Save(content);
Takes up to 30 seconds to save the content, I don“t know how to reduce this time or if someone else has had this issue before.
Please bring some ligth to me!!! :D
try { var content = ApplicationContext.Current.Services.ContentService.CreateContent((model.Name.Trim() + model.Surname.Trim()).Trim(), parentId, "TherapistProfile", userID); //#region Therapist Profile Data var urlAlias = Regex.Replace(model.Name + "-" + model.Surname.Trim(), @"\s+", ""); content.SetValue("umbracoUrlAlias", urlAlias); content.SetValue("therapistName", model.Name); content.SetValue("therapistSurname", model.Surname); content.SetValue("therapistEmail", model.Email); content.SetValue("therapistDateOfBirth", model.DateOfBirth); content.SetValue("therapistTelephone", model.Telephone); content.SetValue("therapistCity", model.City); content.SetValue("therapistTimeZone", model.TherapistTimeZone); content.SetValue("therapistNumber", model.TherapistNumber); content.SetValue("therapistUserIdBBDD", userID); content.SetValue("therapistYearsExperience", model.YearsExperience); content.SetValue("therapistCountry", model.IdCountry); content.SetValue("therapistGender", model.IdGender); content.SetValue("therapistType", model.IdTherapistType); content.SetValue("therapistAboutMe", model.LongDescription); content.SetValue("therapistSkype", model.SkypeID); content.SetValue("therapistHangout", model.HangoutsID); content.SetValue("therapistSpecialities", !string.IsNullOrEmpty(model.SpecialitiesSelected) ? model.SpecialitiesSelected : "0"); content.SetValue("therapistTimeSession", model.DurationOfSessionMinutes); content.SetValue("therapistPriceVideoConference", model.PricePerSession); content.SetValue("therapistPriceChat", model.PricePerSessionChat); #region Uploading Profile Picture if (model.ProfileImage != null) { HttpPostedFileBase file = model.ProfileImage; ImageService _imageService = new ImageService(); var uploadedImage = await _imageService.CreateUploadedImage(file); model.PhotoPath = uploadedImage.Url; await _imageService.AddImageToBlobStorageAsync(uploadedImage); } #endregion content.SetValue("therapistImagePhotoPath", model.PhotoPath); #endregion ApplicationContext.Current.Services.ContentService.Save(content); Services.ContentService.Publish(content); return content.Id; } catch (Ex
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Saving and Publishing content programatically takes ages
Hi all,
I need some help. I am trying to create some nodes on Umbraco programatically, and everything works fine. The only issue is that when I make this call...
Takes up to 30 seconds to save the content, I don“t know how to reduce this time or if someone else has had this issue before.
Please bring some ligth to me!!! :D
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.