I'm trying to make this code with reflection since I want it to manage Technician and other types too.
m_Technician = m_Entities.CreateObject(Of Technician)() 'line#1
m_Technician.IDTechnician = Guid.NewGuid()
m_Entities.AddObject("Technicians", m_Technician)
I used this code with reflection to fill the entity and it work perfectly.
m_Entity = GetType(RFOPSEntities). _
GetMethod(FillMethodName).Invoke(m_Entities, New Object() {uniqueKey})
So I tried something like that for the line #1 :
m_Entity = GetType(RFOPSEntities). _
GetMethod("CreateObject"). _
Invoke(m_Entities, New Object({GetType("Technician")})
I think my difficulty is to pass the (Of Technician)
Thank you