public ActionResult Register(LoginModel ld) { LoginDal logindal = new LoginDal(); if (logindal.EmailExist(ld.Email)) { ViewBag.erroremail = "Email Already Registered"; return(View()); } Passenger p = new Passenger(); p.Email = ld.Email; p.FName = ld.FName; p.LName = ld.LName; p.Age = ld.Age; p.PhoneNo = Convert.ToInt64(ld.PhoneNo); p.Pwd = ld.Pwd; logindal.InsetData(p); return(View()); }