ActivEarth.DAO.RecyclingDAO.GetRecyclingCenters C# (CSharp) Метод

GetRecyclingCenters() публичный статический Метод

Retrieves the collection of all recycling centers submitted to the server.
public static GetRecyclingCenters ( ) : List
Результат List
        public static List<RecycleCenter> GetRecyclingCenters()
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (from c in data.RecyclingCenterDataProviders
                        select
                            new RecycleCenter
                            {
                                UserId = c.user_id,
                                Location = c.location,
                                Comments = c.comments,
                                Automotive = c.automotive,
                                Electronics = c.electronics,
                                Construction = c.construction,
                                Batteries = c.batteries,
                                Garden = c.garden,
                                Glass = c.glass,
                                Hazardous = c.hazardous,
                                Household = c.household,
                                Metal = c.metal,
                                Paint = c.paint,
                                Paper = c.paper,
                                Plastic = c.plastic
                            }).ToList();
            }
        }