private ConfigurationObject GetModelFromViewModel(ConfigurationObjectViewModel viewModel) { ConfigurationObject result = new ConfigurationObject(); result.Value = viewModel.Value; result.Name = viewModel.Name; return(result); }
public void SaveConfigObject([FromBody] ConfigurationObjectViewModel viewModel) { ConfigurationObject model = GetModelFromViewModel(viewModel); _configurationProvider.AddConfigurationObject(model.Name, model.Value); }