public IEnumerable <CustomerDataObject> GetAllCustomers()
        {
            IRepository <Customer>    customerRepository  = IoCFactory.GetObject <IRepository <Customer> >();
            List <CustomerDataObject> customerDataObjects = new List <CustomerDataObject>();
            var allCustomers = customerRepository.GetBySpecification(customer => true).ToList();

            allCustomers.ForEach(p =>
                                 customerDataObjects.Add(CustomerDataObject.CreateFromEntity(p)));
            return(customerDataObjects);
        }
        public CustomerDataObject SearchCustomerByName(string name)
        {
            IRepository <Customer> customerRepository = IoCFactory.GetObject <IRepository <Customer> >();
            IEnumerable <Customer> customers          = customerRepository.GetBySpecification(customer => customer.Name == name);

            if (customers.Count() > 0)
            {
                return(CustomerDataObject.CreateFromEntity(customers.First()));
            }
            return(null);
        }
        public CustomerDataObject GetByID(Guid id)
        {
            IRepository <Customer> customerRepository = IoCFactory.GetObject <IRepository <Customer> >();

            return(CustomerDataObject.CreateFromEntity(customerRepository.GetByID(id)));
        }