public IActionResult GetCustomer(int id) { var customerEntity = customerData.GetById(id); if (customerEntity == null) { return(NotFound()); } return(Ok(customerEntity)); }
public async Task <IEnumerable <Reservation> > GetReservations() { var result = await reservationData.Get(); foreach (var res in result) { res.Customer = await customerData.GetById(res.CustomerId); res.Room = await roomData.GetById(res.RoomId); } return(result); }
public Customer GetById(string id) { return(_customerData.GetById(id)); }
public async Task <CustomerViewModel> Get(Guid id) { return(_mapper.Map <CustomerViewModel>(await _customerData.GetById(id))); }