Ejemplo n.º 1
0
        public async Task <Lacteo> LacteoById([Service] IngredientesRepository repo, [Service] ITopicEventSender eventSender, int id)
        {
            Lacteo lacteoId = repo.GetLacteoId(id);
            await eventSender.SendAsync("RetornaLacteo", lacteoId);

            return(lacteoId);
        }
Ejemplo n.º 2
0
        public async Task ModificarVerduraFruta([Service] IngredientesRepository repo,
                                                [Service] ITopicEventSender eventSender, int idVerdura, String nombre, bool alergeno)
        {
            VerduraFruta editVerduraFruta = await repo.ModificarVerduraFrutaAsync(idVerdura, nombre, alergeno);

            await eventSender.SendAsync("Editado Verdura/Fruta", editVerduraFruta);
        }
Ejemplo n.º 3
0
        public async Task ModificarCarnePescado([Service] IngredientesRepository repo,
                                                [Service] ITopicEventSender eventSender, int idCarne, String nombre, bool alergeno)
        {
            CarnePescado editCarnePescado = await repo.ModificarCarnePescadoAsync(idCarne, nombre, alergeno);

            await eventSender.SendAsync("Editado Carne/Pescado", editCarnePescado);
        }
Ejemplo n.º 4
0
 public PlatoController(PlatoRepository repository, IMapper mapper, IngredientesRepository repositoryIngredientes, PlatoIngredienteRepository platoIngredienteRepository)
 {
     _mapper                     = mapper;
     _repository                 = repository;
     _repositoryIngredientes     = repositoryIngredientes;
     _platoIngredienteRepository = platoIngredienteRepository;
 }
Ejemplo n.º 5
0
        public async Task CrearHarinaCereal([Service] IngredientesRepository repo,
                                            [Service] ITopicEventSender eventSender, int idCereal, String nombre, bool alergeno)
        {
            HarinaCereal newHarinaCereal = await repo.CrearHarinaCerealAsync(idCereal, nombre, alergeno);

            await eventSender.SendAsync("Guardado Harina/Cereal", newHarinaCereal);
        }
Ejemplo n.º 6
0
        public async Task CrearLacteo([Service] IngredientesRepository repo,
                                      [Service] ITopicEventSender eventSender, int idLacteo, String nombre, bool alergeno)
        {
            Lacteo newLacteo = await repo.CrearLacteoAsync(idLacteo, nombre, alergeno);

            await eventSender.SendAsync("Guardado Lacteo", newLacteo);
        }
Ejemplo n.º 7
0
        public async Task CrearCarnePescado([Service] IngredientesRepository repo,
                                            [Service] ITopicEventSender eventSender, int idCarne, String nombre, bool alergeno)
        {
            CarnePescado newCarnePescado = await repo.CrearCarnePescadoAsync(idCarne, nombre, alergeno);

            await eventSender.SendAsync("Guardado Carne/Pescado", newCarnePescado);
        }
Ejemplo n.º 8
0
        public async Task CrearVerduraFruta([Service] IngredientesRepository repo,
                                            [Service] ITopicEventSender eventSender, int idVerdura, String nombre, bool alergeno)
        {
            VerduraFruta newVerduraFruta = await repo.CrearVerduraFrutaAsync(idVerdura, nombre, alergeno);

            await eventSender.SendAsync("Guardado Verdura/Fruta", newVerduraFruta);
        }
Ejemplo n.º 9
0
        public async Task <HarinaCereal> HarinaCerealById([Service] IngredientesRepository repo, [Service] ITopicEventSender eventSender, int id)
        {
            HarinaCereal harinaId = repo.GetHarinaCerealId(id);
            await eventSender.SendAsync("RetornaHarina", harinaId);

            return(harinaId);
        }
Ejemplo n.º 10
0
        public async Task ModificarHarinaCereal([Service] IngredientesRepository repo,
                                                [Service] ITopicEventSender eventSender, int idCereal, String nombre, bool alergeno)
        {
            HarinaCereal editHarinaCereal = await repo.ModificarHarinaCerealAsync(idCereal, nombre, alergeno);

            await eventSender.SendAsync("Editado Harina/Cereal", editHarinaCereal);
        }
Ejemplo n.º 11
0
        public async Task <VerduraFruta> VerduraFrutaById([Service] IngredientesRepository repo, [Service] ITopicEventSender eventSender, int id)
        {
            VerduraFruta verduraId = repo.GetVerduraFrutaId(id);
            await eventSender.SendAsync("RetornaVerdura", verduraId);

            return(verduraId);
        }
Ejemplo n.º 12
0
        public async Task <CarnePescado> CarnePescadoById([Service] IngredientesRepository repo, [Service] ITopicEventSender eventSender, int id)
        {
            CarnePescado carneId = repo.GetCarnePescadoId(id);
            await eventSender.SendAsync("RetornaCarne", carneId);

            return(carneId);
        }
 public IngredientesController(IngredientesRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Ejemplo n.º 14
0
        // I N G R E D I E N T E S

        public List <CarnePescado> AllCarnePescado([Service] IngredientesRepository repo) =>
        repo.GetCarnePescado();
Ejemplo n.º 15
0
 public List <Lacteo> AllLacteo([Service] IngredientesRepository repo) =>
 repo.GetLacteos();
Ejemplo n.º 16
0
 public List <HarinaCereal> AllHarinaCereal([Service] IngredientesRepository repo) =>
 repo.GetHarinaCereal();
Ejemplo n.º 17
0
 public List <VerduraFruta> AllCarneVerduraFruta([Service] IngredientesRepository repo) =>
 repo.GetVerduraFruta();
Ejemplo n.º 18
0
 public IngredientesController(IngredientesRepository repository)
 {
     _repository = repository;
 }
 public IngredientesController(IMapper mapper, IngredientesRepository repository, CenaContext context)
 {
     _mapper     = mapper;
     _Repository = repository;
     _context    = context;
 }