Exemplo n.º 1
0
        public UserDTO Save(UserDTO detail, string passwd)
        {
            CrudFacadeBase <User, Guid, UserDTO, UserDTO> crudFacadeBase = this;

            using (IUnitOfWork uow = crudFacadeBase.UnitOfWorkProvider.Create())
            {
                var entity = crudFacadeBase.Repository.InitializeNew();
                base.PopulateDetailToEntity(detail, entity);
                entity.Password = LoginFacade.SHA256Hash(passwd);
                return(base.Save(entity, true, detail, uow));
            }
        }
Exemplo n.º 2
0
 public UserFacade(Func <UserListQuery> queryFactory, IRepository <User, Guid> repository, IEntityDTOMapper <User, UserDTO> mapper, LoginFacade loginFacade) : base(queryFactory, repository, mapper)
 {
     this.LoginFacade = loginFacade;
 }