Fetch related property via c#

We want to search for a property that is related to another object via C#, to insert data into a table in the database of our sketch errors. Do you know how we could do this? Is there an example we can use? Here is our most recent code:

namespace teste4motivodrecusa
{
/// <summary>
/// The entry point for this Vault Application Framework application.
/// </summary>
/// <remarks>Examples and further information available on the developer portal: http://developer.m-files.com/. </remarks>
public class VaultApplication
: ConfigurableVaultApplicationBase<Configuration>
{
[EventHandler(MFEventHandlerType.MFEventHandlerBeforeCheckInChanges)]
public void TrocaMetadado (EventHandlerEnvironment env)
{

if (env.ObjVerEx.Class != 6 || env.ObjVerEx.State != 163) return;

ObjVerEx ob = env.ObjVerEx;
string teste = ob.GetPropertyText(1285) + ob.GetPropertyText(1060);
//string[] textoDividido = teste.Split(';');
//foreach (string s in textoDividido)
//{
// Console.WriteLine(s);
//}
var propMotivo = ob.GetProperty(1329);
propMotivo.Value.Value = teste;
ob.SaveProperty(propMotivo);

}
}
}