ActivEarth.DAO.CarpoolDAO.GetCarpools C# (CSharp) Метод

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

Retrieves the collection of all carpools submitted to the server.
public static GetCarpools ( ) : List
Результат List
        public static List<Carpool> GetCarpools()
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (from c in data.CarpoolDataProviders
                        select
                            new Carpool
                            {
                                ID = c.id,
                                UserId = c.user_id,
                                Comments = c.comments,
                                Start = c.start,
                                Destination = c.destination,
                                Time = c.time,
                                SeatsAvailable = c.seats_available,

                            }).ToList();
            }
        }