I need to get access (query/insert/update) to tables located in different schema.
I've successfully generated and built the software; at runtime, context is created as well as all requested objects, but as soon as I execute the AddObject():
Code: Select all
L3Core.Communication.DM.PPS_L2SMP.PPS_SMP_INT_SEND controlItem = new DM.PPS_L2SMP.PPS_SMP_INT_SEND();
controlItem.MSG_ID = telegramId;
controlItem.MSG_KEY = telegramId.ToString(); // Not in use
controlItem.READ_COUNT = 0;
controlItem.SEND_TIME = DateTime.Now;
controlItem.SIMULATION = 0;
controlItem.STATUS = 0;
controlItem.STATUS_TEXT = "";
context.PPS_SMP_INT_SENDs.AddObject(controlItem); // <------- THIS
Model has been created via Entity Developer without any problem. During table selection I've un-selected the default schema and opened the one I need. Other settings have been kept as default.An exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll but was not handled in user code
Additional information: The EntitySet name 'PpsL2SmpEntities.PPS_SMP_INT_SENDs' could not be found.
Did I forget something?