Categories
c# entity-framework mapping sql

Entity framework map column which is not in old database

I have table in a new DB which contains column ‘Note’. I have old DB with the same table with the same structure which have not column ‘Note’.
I changed edmx, I added (mapped) column ‘Note’ from new DB. But if I want to use edmx in old DB I have error: column doest not exists…

I try to put code to try catch, but without succesfull. Error is outside off try catch.

//---new version DB
try
{
vehicles = entities.Vehicle.Where(v => v.NumPlate == numPlate || v.Note == numPlate);
}
catch (Exception)
{
vehicles = entities.Vehicle.Where(v => v.NumPlate == numPlate);
}
//---old version DB
foreach (Vehicle vehicle in vehicles) //<------- ERROR

How can I resolve?
Thanks