Example #1
0
 public void AddUser(MUser user)
 {
     _uow.Users.Create(new User {
         Name = user.Name, Password = user.Password, Role = user.Role
     });
     _uow.Save();
 }
 public virtual bool AddUser(MUser n)
 {
     uow.Users.Create(new User {
         Name = n.Name, Surname = n.Surname, Role = n.Role, Login = n.Login, Pass = n.Pass
     });
     uow.Save();
     return(true);
 }
 public virtual bool AddUser(MUser newuser)
 {
     uow.Users.Create(new User {
         Name = newuser.Name, Login = newuser.Login, Pass = newuser.Pass, Role_FK = newuser.Role_FK
     });
     uow.Save();
     return(true);
 }
Example #4
0
 public List <MUser> CreateUser(MUser Model)
 {
     try
     {
         return(dbtran.DbToList <MUser>("SP_CREATE_User", new
         {
             Username = Model.Username,
             Email = Model.Email,
             Password = Model.Password,
             Phone = Model.Phone,
             Address = Model.Address,
             City = Model.City,
             Country = Model.Country,
             Name = Model.Name,
             PostCode = Model.PostCode,
         }, true));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }