Hello,
in my Db I have 2 none relation table that I would like to get results from both of them in my web Api controller .
in my repository I'm just asking for IEnumerable list . how can I get it ?
My repo look like this
public IEnumerable<Cafe> getAllCafes() { return _cotx.Cafe.OrderBy(c => c.SynCity).ToList(); } public IEnumerable<Restaurants> getAllResturant() { return _cotx.Restaurantses.OrderBy(c => c.City).ToList(); }
& I would like to get more or less something like this : (any direction in how to will help )Thanks
[HttpGet] public IActionResult Get() { //return Ok( from c in _repository.GetAllSynagugesByCity.Select c, return Ok(_repository.getAllCafes().GroupJoin(_repository.getAllResturant) ); }