public void SubmitForm(AccountRoleEntity entity, string keyValue) { if (string.IsNullOrEmpty(keyValue)) { entity.Create(); accountRoleRepository.Insert(entity); } else { entity.Modify(keyValue); accountRoleRepository.Update(entity); } }