public HttpResponseMessage GetAll(HttpRequestMessage request) { IEnumerable <NguoiDung> listNguoiDung = null; var toTal = 0; try { listNguoiDung = _nguoiDungService.GetAll(); toTal = listNguoiDung.ToList().Count; if (toTal > 0) { Message = "Danh sách người dùng"; } else { throw new DbEntityValidationException("Không tồn tại người dùng nào"); } } catch (DbEntityValidationException ex) { LogException(ex); } return(GetResponseMessage(IsSuccess, Message, toTal, listNguoiDung)); }