示例#1
0
        public User Add(ViewModels.RegisterViewModel register)
        {
            // TODO: Add insert logic here
            var newAttorney = new User();

            newAttorney.User_Id = Guid.NewGuid();
            newAttorney.User_Code = register.Code;
            newAttorney.Hashed_Password = BCrypt.Net.BCrypt.HashPassword(register.Password);

            db.User.Add(newAttorney);

            db.SaveChanges();

            return newAttorney;
        }
示例#2
0
        public AttorneyIdentity(IIdentity identity, User attorney)
        {
            _identity = identity;

            this.Attorney = attorney;
        }