Beispiel #1
0
        public async Task <EstadoTo> ObtenerEstadoPorIdAsync(int id)
        {
            EstadoTo estado = new EstadoTo();

            using (var Contexto = ViveVolarDbContext.GetDbContext())
            {
                var estadoRepositorio = new EstadoRepository(Contexto);
                var result            = await estadoRepositorio.ObtenerPorId(id.ToString());

                estado = Mapper.Map <EstadoTo>(result);
            }
            return(estado);
        }
Beispiel #2
0
        public void ObtenerEstadoPorIdAsync()
        {
            EstadoTo estado = _maestroRepo.ObtenerEstadoPorIdAsync(1).Result;

            Assert.IsTrue(estado.Nombre != null);
        }