Esempio n. 1
0
        private RegisterDataEntity ConvertRegisterAccountToRegisterDataEntity(RegisterAccount entry)
        {
            var entity = new RegisterDataEntity();

            entity.UserId = entry.UserId;
            entity.UserName = entry.UserName;
            entity.Password = entry.Password;
            entity.Name = entry.Name;
            entity.Email = entry.Email;

            return entity;
        }
Esempio n. 2
0
        public ActionResult Register(RegisterAccount mode)
        {
            var entity = ConvertRegisterAccountToRegisterDataEntity(mode);
            if (ModelState.IsValid)
            {
                _entities.AddToRegisterDataEntities(entity);
                _entities.SaveChanges();
                ModelState.Clear();
                mode = null;

            }
            return View(mode);
        }