public IList<F41010Model> GetData(int page,int pagesize) { AutoMapper.Mapper.CreateMap<F41010, F41010Model>(); objF41010 = new F41010Repository(); IList<F41010> objEntity = objF41010.GetAll().Skip(page*pagesize).Take(pagesize).ToList(); IList<F41010Model> resultModel = new List<F41010Model>(); resultModel = Mapper.Map(objEntity, resultModel); return resultModel; }
public IList<F41010Model> GetData(IList<string> ItemNo2ndList) { AutoMapper.Mapper.CreateMap<F41010, F41010Model>(); objF41010 = new F41010Repository(); //IList<F41010> objEntity = objF41010.GetAll().Any(x => ItemNo2ndList.Contains(x.ItemNo2nd)); //var objEntity = objF41010.GetAll().Any(x => ItemNo2ndList.Contains(x.ItemNo2nd)); IList<F41010> objEntity = (from r in objF41010.GetAll().ToList() where ItemNo2ndList.Contains(r.ItemNo2nd) select r).AsEnumerable<F41010>().ToList(); IList<F41010Model> resultModel = new List<F41010Model>(); resultModel = Mapper.Map(objEntity, resultModel); return resultModel; }