/// <summary> /// Update region /// </summary> /// <param name="context"></param> /// <param name="regionInfo"></param> public static void UpdateSeedNewsletterInfo(this IDynamicsClient context, Models.Newsletter newsletterInfo) { Newsletter newsletter = context.GetNewsletterBySlug(newsletterInfo.Slug); if (newsletter == null) { context.AddInitialNewsletter(newsletterInfo.ToViewModel()); } else { // update Newsletter. MicrosoftDynamicsCRMlist list = new MicrosoftDynamicsCRMlist() { Purpose = newsletterInfo.Title, Description = newsletterInfo.Description, Listname = newsletterInfo.Slug }; context.Lists.Update(newsletter.Id.ToString(), list); } }