public IActionResult Orders() { IEnumerable <UserOrderViewModel> orders = _sqlOrderService.GetUserOrders(User.Identity.Name) .Select(order => new UserOrderViewModel() { OrderNumber = order.Id, Name = order.UserName, Address = order.Address, Phone = order.Phone, TotalSum = order.TotalPrice }); return(View(orders)); }
public IEnumerable <OrderDTO> GetUserOrders(string username) { return(_sqlOrderService.GetUserOrders(username)); }