public LogicResult <IEnumerable <UserDTO> > GetAll() { try { var users = _userBusinessLogic.GetAll(); return(LogicResult <IEnumerable <UserDTO> > .Succeed(users)); } catch (Exception exception) { return(LogicResult <IEnumerable <UserDTO> > .Failure(exception)); } }
public ActionResult <ICollection <UserDTO> > GetAllUsers() { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var users = mapper.Map <UserDTO[]>(userBusinessLogic.GetAll()); return(Ok(users)); } catch (Exception e) { return(StatusCode(500, e.Message)); } }
public void GetAllTest() { userBLWithoutTeamBL.GetAll(); mockUserRepo.Verify(r => r.Get(null, null, ""), Times.Once); }
public ActionResult <ReturnMessage> GetAll() { return(_userBL.GetAll()); }