Beispiel #1
0
        public async Task <ActionResult> GetEntity(int key)
        {
            try
            {
                var customer = await customerRepository.GetEnitityByKeyAsync(key).ConfigureAwait(false);

                var result = HypermediaCustomerHto.FromDomain(customer);
                return(Ok(result));
            }
            catch (EntityNotFoundException)
            {
                return(this.Problem(ProblemJsonBuilder.CreateEntityNotFound()));
            }
        }
 public static HypermediaCustomerHto FromDomain(Customer customer)
 {
     HypermediaCustomerHto hto = default !;