public static void Update(Form form) { Form form2 = GetForm(form.Code); if (form2 != null && form2.ID != form.ID) throw new Exception("There is another form has the same e-mail, please choose another code"); FormDataMapper.Update(form); }