MetricItemEntity does not contain definition for MetricBoilerPlate and no accessible extension method for MetricBoilerPlate. please check the below sample code.
try
{
daysBeforeToSendOutNotification = metric.MetricBoilerPlate.SetupNotificationDaysPrior;
sendEveryNumberOfDays = metric.MetricBoilerPlate.RemiderDurationSpanDays;
}
catch (ORMEntityOutOfSyncException)
{
metric.MetricBoilerPlate = _repository.GetEntityById(new MetricBoilerPlateEntity(metric.MetricBoilerPlateId));
metric.MetricBoilerPlate.MetricSubType = _repository.GetEntityById(new MetricSubTypeEntity(metric.MetricBoilerPlate.TypeId));
metric.MetricBoilerPlate.MetricSubType.MetricType = _repository.GetEntityById(new MetricTypeEntity(metric.MetricBoilerPlate.MetricSubType.MetricTypeId));
daysBeforeToSendOutNotification = metric.MetricBoilerPlate.SetupNotificationDaysPrior;
sendEveryNumberOfDays = metric.MetricBoilerPlate.RemiderDurationSpanDays;
}
DateTime lastDayThisMetricWasSent = metric.MetricBoilerPlate.ReminderLastSentDate;