public IEnumerable <object> Get() { List <object> _list = new List <object>(); var result = _dBRepository.GetAll(); foreach (var item in result) { _list.Add(item.ToJson()); } return(_list); }
public ResponseViewModel GetAllUser() { ResponseViewModel response = new ResponseViewModel(); try { var result = _userRepository.GetAll().AsQueryable().ToList(); if (result != null) { response.Message = Constants.Retreived; response.ResponseData = result; response.Status = (int)Numbers.One; } } catch (Exception ex) { throw ex; } return response; }
public IActionResult Index() { var viewModel = _studentRepository.GetAll(); return(View(viewModel)); }