예제 #1
0
        public List <ClothesTrackingDto> GetByUserGuidId(long userGuidId, ClothesTrackingEnum clotheStatus)
        {
            var user   = UserService.GetByGuid(userGuidId);
            var result = ((IClothesTrackingRepository)Repository).GetDeepByUserId(user.Id, clotheStatus);

            return(AutoMapper.Mapper.Map <List <ClothesTrackingDto> >(result));
        }
예제 #2
0
        public List <ClothesTracking> GetDeepByUserId(long userId, ClothesTrackingEnum clotheStatus)
        {
            var result = Context.ClothesTrackings.Where(p => p.OrderClothes.UserId == userId && (int)p.Action == (int)clotheStatus)
                         .Include(p => p.OrderClothes.User)
                         .Include(p => p.OrderClothes.ClotheType);

            return(result.ToList());
        }
예제 #3
0
 public async Task <IHttpActionResult> GetClothesByUserId(ClothesTrackingEnum clotheStatus)
 {
     try
     {
         var result = ClothesTrackingService.GetByUserGuidId(userGuidId, clotheStatus);
         return(Ok(result));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }