コード例 #1
0
        /// <summary>
        /// Obtener lista de states
        /// Autor: Jair Guerrero
        /// Fecha: 2021-02-20
        /// </summary>
        public List <StatesAM> Get(Expression <Func <StatesAM, bool> > predicate)
        {
            try
            {
                var where = mapper.MapExpression <Expression <Func <States, bool> > >(predicate);

                IRepository <States> repo = new StatesRepo(context);
                var states = repo.Get(where);

                return(mapper.Map <List <StatesAM> >(states));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }