private async Task RemoveEndingServices() { InProgress = true; try { using (var scope = _serviceScopeFactory.CreateScope()) { IBaseRepository <Servicio> _servicioRepository = scope.ServiceProvider.GetRequiredService <IBaseRepository <Servicio> >(); var servicios = await _servicioRepository.ListBy(s => s.Active == true && s.FechaFin <= DateTime.Now); IServicioService _servicioService = scope.ServiceProvider.GetRequiredService <IServicioService>(); foreach (var servicio in servicios) { await _servicioService.RemoveAsEnding(servicio.Id); } } } catch (Exception e) { throw e; } finally { InProgress = false; } }
public SeguimientoService(IEntityBaseRepository <Seguimiento> SeguimientoRepositorio, IUnitOfWork unitOfWork, IEstadoService estadoService, IServicioService servicioServiceExt) { _SeguimientoRepositorio = SeguimientoRepositorio; _estadoService = estadoService; _servicioServiceExt = servicioServiceExt; _unitOfWork = unitOfWork; }
public ServiciosController(IServicioService servicioService) { this._ServicioService = servicioService; }
public SeguimientosController(ICommonInterface <Seguimiento> seguimientoService, ISeguimientoService seguimientoServiceExtend, IServicioService servicioServiceExt) { _seguimientoService = seguimientoService; _seguimientoServiceExtend = seguimientoServiceExtend; _servicioServiceExt = servicioServiceExt; }
public ServicioController(IServicioService servicioService) { _servicioService = servicioService; }
public SuppliersController(ISupplierService supplierService, IServicioService servicioService) { this.supplierService = supplierService; this.servicioService = servicioService; }
public ServicioController(ICommonInterface<Servicio> servicioService, ICommonInterface<Seguimiento> seguimientoService, IServicioService servicioServiceExt) { _servicioService = servicioService; _servicioServiceExt = servicioServiceExt; _seguimientoService = seguimientoService; }
public ServicioController(IServicioService servicioService, IMapper mapper) { this._servicioService = servicioService; this._mapper = mapper; }
public ServiciosController(IServicioService _servicioService) { this.servicioService = _servicioService; }
public ServiciosController(IServicioService servicioService, IMotivoBajaServicioService motivoBajaServicioService) { _servicioService = servicioService; _motivoBajaServicioService = motivoBajaServicioService; }
public ServiciosController(IServicioService servicioService, IMapper mapper) { _servicioService = servicioService; _mapper = mapper; }