Beispiel #1
0
        public async Task <JsonResult> GetSpotGoodsPatterns(SpotGoodsType type)
        {
            var manager = new SpotGoodsPatternManager(User);
            var result  = await manager.GetSpotGoodsPatternListAsync(type);

            return(Json(true, string.Empty, result));
        }
Beispiel #2
0
        public async Task <IHttpActionResult> Patterns(SpotGoodsType type)
        {
            var manager           = new SpotGoodsManager();
            var spotGoodsPatterns = await manager.GetSpotGoodsPatternListAsync(type);

            var spotGoodsPatternViewModels = spotGoodsPatterns.Select(u =>
            {
                return(new SpotGoodsPatternViewModel(u));
            });

            return(Ok(spotGoodsPatternViewModels));
        }
Beispiel #3
0
 public async Task <IEnumerable <SpotGoodsPattern> > GetSpotGoodsPatternListAsync(SpotGoodsType type)
 {
     return(await DbContext.Set <SpotGoodsPattern>().Where(r => r.Type == type).AsNoTracking().ToListAsync());
 }