public async Task UpdateMasterWithCommunityAsync(MyCommunityViewModel model) { var source = _MasterRepo.DataSource.Community; source.CommunityName = model.CommunityName; await _MasterRepo.SaveCommunityAsync(source); }
//Communities public async Task UpdateCommunityAsync(MyCommunityViewModel model) { string requestURL = "/dyn365/api/v1.0/Communities/{updateCommunityName}"; var httpMethod = BaseNetworkAccessEnum.Patch; var parameters = new Dictionary <string, ParameterTypedValue>() { { "Ocp-Apim-Subscription-Key", new ParameterTypedValue(Constants.APIM_GUID, ParameterTypeEnum.HeaderParameter) }, { "Authorization", new ParameterTypedValue(model.TokenID, ParameterTypeEnum.HeaderParameter) }, { "body", new ParameterTypedValue(new { userId = model.UserID, communityName = model.CommunityName }, ParameterTypeEnum.BodyParameter) } }; await _NetworkInterface(requestURL, parameters, httpMethod); }
public async Task SaveCommunityAsync(MyCommunityViewModel model) { await _DynamixService.UpdateCommunityAsync(model); }