public mUser UserUpdate(mUser muser) { User user = user_repo.Get(d => d.id == muser.Id); muser.ToDb(user); SubmitChanges(); return(new mUser(user)); }
public int UserAdd(mUser newuser) { newuser.Password = Encrypt.EncryptUserPassword(newuser.Password); User user = new User(); user_repo.Add(newuser.ToDb(user)); SubmitChanges(); return(user.id); }
public mUser UserUpdate(mUser muser) { User user = user_repo.Get(d => d.id == muser.Id); muser.ToDb(user); SubmitChanges(); return new mUser(user); }
public int UserAdd(mUser newuser) { newuser.Password = Encrypt.EncryptUserPassword(newuser.Password); User user = new User(); user_repo.Add(newuser.ToDb(user)); SubmitChanges(); return user.id; }