Session Create relies on the cast type rather than the actual type. For instance, attempting to save a Model class that's cast to an object will cause an exception. Checking the instance type ( entity.GetType() ) would properly save the model in all cases.
var patient = new Patient();
// This explodes because Argo assumes the type is object
await session.Create((object)patient);
Session Create relies on the cast type rather than the actual type. For instance, attempting to save a Model class that's cast to an object will cause an exception. Checking the instance type ( entity.GetType() ) would properly save the model in all cases.