예제 #1
0
 public ActionResult Signup(user_master model)
 {
     using (var context = new ProductManagementEntities())
     {
         context.user_master.Add(model);
         context.SaveChanges();
     }
     return(RedirectToAction("Login"));
 }
예제 #2
0
        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());
            }
        }
예제 #3
0
 public ProductService()
 {
     _context = new ProductManagementEntities();
 }
예제 #4
0
 public HomeController()
 {
     dbobj = new ProductManagementEntities();
 }
 public ProductRepository()
 {
     db = new ProductManagementEntities();
 }