public ActionResult Signup(user_master model) { using (var context = new ProductManagementEntities()) { context.user_master.Add(model); context.SaveChanges(); } return(RedirectToAction("Login")); }
public ActionResult Login(user_master model) { using (var context = new ProductManagementEntities()) { bool isValid = context.user_master.Any(x => x.EmailID == model.EmailID && x.Password == model.Password); if (isValid) { FormsAuthentication.SetAuthCookie(model.EmailID, false); return(RedirectToAction("Index", "DataConnect")); } ModelState.AddModelError("", "Invalid emailid and password"); return(View()); } }
public ProductService() { _context = new ProductManagementEntities(); }
public HomeController() { dbobj = new ProductManagementEntities(); }
public ProductRepository() { db = new ProductManagementEntities(); }