EF常用的添加和修改数据
if (typeof(T) == typeof(PLC_CommunicationData) || typeof(T) == typeof(PLCDeviceInfo))
{
using (var context = new TuniSettingDataContext())
{
if (Exist
{
context.Entry
}
else
{
context.Entry
}
return context.SaveChanges() > 0;
}
}