public void saveUserDetails(UserAccounts item) { using (db = new iGratifyEntities()) { UserDetail tab = new UserDetail(); tab.UserId = item.UserID; tab.Password = item.password; tab.FirstName = item.FullName; tab.Email = item.Email; tab.Gender = item.Gender; tab.MobileNo = item.MobileNo; tab.Profession = item.Profession; tab.Domain = item.Domain; tab.Industry = item.Industry; tab.Country = item.Country; db.UserDetails.Add(tab); db.SaveChanges(); } }
public int saveOTP(UserAccounts ua) { int result = 0; using (db = new iGratifyEntities()) { try { OTPMaster otp = new OTPMaster(); otp.UserId = ua.UserID; otp.Email = ua.Email; otp.Mobile = ua.MobileNo; otp.OTP = ua.OTP; db.OTPMasters.Add(otp); db.SaveChanges(); return(result = 1); } catch (Exception e) { return(result = -1); } } }