Question: I would like to union 2 tables and display all in a datagrid:

* tblReservation (ID, StartTime, EndTime, SchoolID, AccomodationID)
* tblMeeting (ID, StartTime, EndTime, Subject, Location)

In the datagrid I have 2 matching columns (StartTime, EndTime) and 2 different columns. Still I want to unite these 2 tables and set column 3 for School/Subject and column 4 for Accomodation/Location.

In PHP I know you can set names for the fields you get by using 

```
SELECT x AS name

```

but I am not very familiar with the LINQ-syntax.

Here I get the data from tblReservation from the date I've selected in the month calendar:

```
var vReservation = (from oReservation in clsApplication._oDBConnection.tblReservations
    where oReservation.StartTime.Value.Date >= mcCalendar.SelectionRange.Start.Date
    && oReservation.StartTime.Value.Date < cCalendar.SelectionRange.Start.Date.AddHours(24)
    orderby oReservation.StartTime ascending
    select oReservation);

foreach (var oReservation in vReservation)
{
    build the datagrid
}

```

How can I add the other table to this loop?

Answer: 
you can try these links

<http://msdn.microsoft.com/en-us/library/ff941122%28v=VS.92%29.aspx>

<http://msdn.microsoft.com/en-us/library/microsoft.phone.info.deviceextendedproperties%28v=VS.92%29.aspx>

you can try this 

```
   public MainPage()
   {
            InitializeComponent();
            GetDeviceInfo();    
   }    
   public void GetDeviceInfo()
   {
            long ApplicationMemoryUsage = DeviceStatus.ApplicationCurrentMemoryUsage;
            long PeakMemoryUsage = DeviceStatus.ApplicationPeakMemoryUsage;
            string FirmwareVersion = DeviceStatus.DeviceFirmwareVersion;
            string HardwareVersion = DeviceStatus.DeviceHardwareVersion;
            string Manufacturer = DeviceStatus.DeviceManufacturer;
            string DeviceName = DeviceStatus.DeviceName;
            long TotalMemory = DeviceStatus.DeviceTotalMemory;
            string OSVersion = Environment.OSVersion.Version.ToString(); ;
            PowerSource powerSource = DeviceStatus.PowerSource;
            AddToList("Memory Usage :" + ApplicationMemoryUsage);
            AddToList("Peak Memory Usage :" + PeakMemoryUsage);
            AddToList("Firmware Version :" + FirmwareVersion);
            AddToList("Hardware Version :" + HardwareVersion);
            AddToList("Manufacturer :" + Manufacturer);
            AddToList("Total Memory :" + TotalMemory);
            AddToList("Power Source:" + powerSource.ToString());
            AddToList("Operating System: Windows Phone " + OSVersion.ToString());

   }    
   public void AddToList(string Property)
   {
            lstboxDeviceInfo.Items.Add(Property);
   }

```

take a look at here [for more info](http://www.ginktage.com/2011/07/retreive-the-device-information-from-windows-phone/)
Check out the `DeviceStatus` class.

Have a look at [MSDN](http://msdn.microsoft.com/en-us/library/ff941122%28v=VS.92%29.aspx) about it. 

**Added** - after first comment

Check out [`System.Environment`](http://msdn.microsoft.com/en-us/library/system.environment%28v=VS.95%29.aspx)

```
System.Environment.OSVersion

```