Ejemplo n.º 1
0
        public OperationResult <IEnumerable <Addresses> > GetCustomerAddresses(string id)
        {
            var result   = new OperationResult <IEnumerable <Addresses> >();
            var customer = _customerRepo.Get(id);

            if (customer == null)
            {
                result.Status = eOperationStatus.NotFound;
            }
            else
            {
                result.Data   = _addrRepo.GetByCustomer(id);
                result.Status = eOperationStatus.Success;
            }

            return(result);
        }