public async Task UpdateHarvestingPlan(HarvestingPlanDto input) { var plan = _harvestingPlanRepository.FirstOrDefault(input.Id); plan.StationId = input.StationId; plan.Path = input.Path; await _harvestingPlanRepository.UpdateAsync(plan); }
public async Task DeleteHarvestingPlanAsync(HarvestingPlanDto input) { var plan = _harvestingPlanRepository.FirstOrDefault(input.Id); if (plan == null) { throw new UserFriendlyException("Harvesting Plan not Found!"); } await _harvestingPlanRepository.DeleteAsync(plan); }