Ejemplo n.º 1
0
        public void AddUser(User value)
        {
            string token = SendMail(value.Email);
            User   user  = new User()
            {
                Email = value.Email, Workspace = value.Workspace, Token = token
            };

            _context.User.Add(user);
            _context.SaveChanges();
        }
        public IActionResult Delete(int id)
        {
            VerifiedPhysician vp = _verificationContext.VerifiedPhysicians.FirstOrDefault(p => p.Id == id);

            _verificationContext.Remove(vp);
            _verificationContext.SaveChanges();
            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 3
0
        public void CreateTestData(VerificationContext Usercontext)
        {
            List <User> user = new List <User>()
            {
                new User {
                    Email = "*****@*****.**", Token = "123qwe"
                },
                new User {
                    Email = "*****@*****.**", Token = "456rty"
                }
            };

            Usercontext.AddRange(user);
            Usercontext.SaveChanges();
        }