private Task OnSiteInfoUpdatedAsync(SiteInfoModel siteInfoModel) { SiteInfo.CertificateThumbprint = siteInfoModel.CertificateThumbprint; SiteInfo.Environment = siteInfoModel.Environment; PublishInfo.Branch = siteInfoModel.Branch; PublishInfo.Commit = siteInfoModel.Commit; return(Task.CompletedTask); }
public object Any(Services.SetOverview request) { SiteInfoModel siteInformation = dbContext.SiteInfo.SingleOrDefault(); if (siteInformation == null) { siteInformation = new SiteInfoModel(); siteInformation.Version = 1; siteInformation.OverviewText = request.Overview; dbContext.SiteInfo.Add(siteInformation); } siteInformation.OverviewText = request.Overview; siteInformation.Version = siteInformation.Version + 1; dbContext.SaveChanges(); return(true); }
public object Any(Services.SetProfilePicture request) { SiteInfoModel siteInformation = dbContext.SiteInfo.SingleOrDefault(); if (siteInformation == null) { siteInformation = new SiteInfoModel(); siteInformation.Version = 1; siteInformation.ProfilePicture = request.ProfilePicture; dbContext.SiteInfo.Add(siteInformation); } siteInformation.ProfilePicture = request.ProfilePicture; siteInformation.Version = siteInformation.Version + 1; dbContext.SaveChanges(); return(true); }