public ActionResult <List <SuperOrder> > Get() { var user = Repo.GetUsers(); var inv = Repo.GetInventories().ToList(); var loc = Repo.GetLocations().ToList(); var orderList = Repo.GetOrders(); var model = new List <SuperOrder>(); foreach (var item in orderList) { model.Add(new SuperOrder { orderTime = item.OrderTime, cost = item.Cost, user = Repo.GetUserByUserById(item.UserId).Username, location = Repo.GetLocationById(item.LocationId).City }); } return(model); }
public ActionResult <List <Users> > GetAll() { log.Info("Retreiving all users"); return(Repo.GetUsers().ToList()); }