You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
532 B
23 lines
532 B
using Application.Domain.Entities;
|
|
using Infrastructure.Data;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace IoTCenter.Services
|
|
{
|
|
public class EventJob
|
|
{
|
|
private readonly IRepository<IoTTimer> _timerRepo;
|
|
|
|
public EventJob(IRepository<IoTTimer> timerRepo)
|
|
{
|
|
this._timerRepo = timerRepo;
|
|
}
|
|
|
|
public void TimerHanle(Guid id)
|
|
{
|
|
var timer = this._timerRepo.ReadOnlyTable().FirstOrDefault(o => o.Id == id);
|
|
//call timer's command
|
|
}
|
|
}
|
|
} |