public IEnumerable <UserDTO> GetContacts(UserDTO user) { return(_mapper.Map <IEnumerable <User>, IEnumerable <UserDTO> >(unit.UserRepository.GetById(user.Id)?.UserContact?.Contacts)); }
public void AddUser(UserDTO u) { p.AddUser(mapper.Map <User>(u)); }
public AvatarDTO GetAvatar(UserDTO user) { return(_mapper.Map <AvatarDTO>((unit.AvatarRepository.Get(u => u.IsActive && u.UserId == user.Id))?.FirstOrDefault())); }
public void AddUser(UserDTO newUser) { unit.UserRepository.Create(_mapper.Map <User>(newUser)); unit.UserRepository.Save(); }
public void AddUser(UserDTO user) { _unitOfWork.UserRepository.Insert(_mapper.Map <User>(user)); _unitOfWork.Commit(); }
public OrderDTO GetByNick(UserDTO user) { return(null); }
public bool IsUserReservBook(BookProductDTO bookProductDTO, UserDTO userDTO) { var prod = _unitOfWork.ProductRepository.GetByID(bookProductDTO.Id); return(_unitOfWork.ReservRepository.Get(r => r.ProductId == prod.BookId && r.UserId == userDTO.Id && r.IsActive).Count() != 0); }
public IEnumerable <SaleDTO> GetSales(UserDTO userDTO) { return(_mapper.Map <IEnumerable <Sale>, IEnumerable <SaleDTO> >(_unitOfWork.SaleRepository.Get(r => r.UserId == userDTO.Id))); }
public IEnumerable <ReservDTO> GetReservs(UserDTO userDTO) { return(_mapper.Map <IEnumerable <Reserv>, IEnumerable <ReservDTO> >(_unitOfWork.ReservRepository.Get(r => r.UserId == userDTO.Id))); }
public UserTypeDTO GetUserType(UserDTO userDTO) { return(_mapper.Map <UserTypeDTO>(_unitOfWork.UserTypeRepository.GetByID(userDTO.UserTypeId))); }
public void UpdateUser(UserDTO userDTO) { userDAL.UpdateUser(userDTO); }