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();
}
}