Ejemplo n.º 1
0
 public Listing CreateListingEntity(ListingDetailDTO listingDTO)
 {
     return(new Listing()
     {
         Description = listingDTO.Description,
         ItemName = listingDTO.ItemName,
         Quantity = listingDTO.Quantity,
         ProductCategory = categoryRepo.GetCategoryById(listingDTO.ProductCategory.Id),
         Price = listingDTO.Price,
         ImageUrl = listingDTO.ImageUrl,
         Status = statusRepo.GetStatusById(listingDTO.Status.Id),
         Shipping = shippingRepo.GetShippingStatusById(listingDTO.Shipping.Id),
         AuctionStartTime = listingDTO.AuctionStartTime,
         AuctionEndTime = listingDTO.AuctionEndTime,
         User = userRepo.GetUserById(listingDTO.User.Id)
     });
 }