PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 8/16/2018 5:43 AM by  Reto Cossalter
Latest addition module?
 7 Replies
 1 Subscribed to this topic
 1 Subscribed to this forum
Sort:
You are not authorized to post a reply.
Page 2 of 2 << < 12
Author Messages





Veteran Member






--
8/13/2018 1:23 PM
Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





New Member






--
8/15/2018 12:11 PM
Thank you both for the replies!
I am sure that is the correct LINQ syntax, but I am still getting an error. My guess is that the variable is actually not part of the call to the database?

This is the error I am seeing:

'Hotcakes.Modules.Core.Models.SingleProductViewModel' does not contain a definition for 'CreationDate' and no extension method 'CreationDate' accepting a first argument of type 'Hotcakes.Modules.Core.Models.SingleProductViewModel' could be found





Basic Member






--
8/16/2018 5:43 AM
You are right, SingleProductViewModel does not contain this property. Sorry, my bad.
But you could try to access the Product via Item { get; set; } that is type of Product

@foreach (var item in Model.Products.OrderBy(i => i.Item.CreationDateUtc))

or maybe the LastUpdated

@foreach (var item in Model.Products.OrderBy(i => i.Item.LastUpdated))

You are not authorized to post a reply.
Page 2 of 2 << < 12


Loading
  • Sign-up for the Hotcakes Community Newsletter: