Ejemplo n.º 1
0
        public static List <ICustomer> CustomersWhoBoughtProduct(int productId)
        {
            List <ICustomer> result = new List <ICustomer>();

            using (MyModelContainer ctx = new MyModelContainer())
            {
                var entityList = ctx.CustomersWhoBoughtProduct(productId).ToList();
                foreach (var entity in entityList)
                {
                    result.Add(new CustomersWhoBoughtProduct_Result_Adapter(entity));
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static List <ICustomer> CustomersByCountry(string country)
        {
            List <ICustomer> result = new List <ICustomer>();

            using (MyModelContainer ctx = new MyModelContainer())
            {
                var entityList = ctx.CustomersByCountry(country).ToList();
                foreach (var entity in entityList)
                {
                    result.Add(new CustomersByCountry_Result_Adapter(entity));
                }
            }
            return(result);
        }