public void SubmitForm(DimensionEntity dimensionEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { dimensionEntity.Modify(keyValue); service.Update(dimensionEntity); } else { dimensionEntity.Create(); service.Insert(dimensionEntity); } }