- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
public void SaveModels(IEnumerable<Activity> models)
{
if (models == null && models.Count() == 0) return;
// step 1/3: remove empty models
var empty = models.Where(m => !m.ForecastedValue.HasValue && !m.ActualValue.HasValue).ToList();
if (empty != null)
{
models = models.Except(empty);
}
.....
}