public ActionResult Registration(ViewModel viewModel) { CommonClass cc = new CommonClass(); cc.EMail = viewModel.user.EMail; cc.FName = viewModel.userPersonal.FName; cc.LName = viewModel.userPersonal.LName; cc.Password = viewModel.user.Password; cc.Phone = viewModel.userPersonal.Phone; cc.Gender = viewModel.userPersonal.Gender; cc.DOB = viewModel.userPersonal.DOB; cc.Address = viewModel.userPersonal.Address; var t = bl.verifyEmail(cc.EMail); // var t = bl.verifyDbEmail(cc.EMail); if (t) { ViewBag.message1 = "User already Exists!!"; } else { var k = bl.AddData(cc); if (k) { ViewBag.message = "Data recorded"; } else { ViewBag.message = "Invalid Data "; } } return(View()); }