Ejemplo n.º 1
0
        public ActionResult <ViewModel <Customer> > GetById([FromQuery] int id)
        {
            var customer = _customers.WithId(id);

            if (customer is null)
            {
                return(NoContent());
            }

            var vm = CustomerViewModel.From(Request, customer);

            return(Ok(vm));
        }