Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
Public Preview 1
Description
Hello!
I've a very simple model:
public class MasterProduct |
{
|
[BsonId]
|
[BsonRepresentation(BsonType.Int32)]
|
public int Id { get; set; } |
public int Category { get; set; } |
public string Art { get; set; } |
public string Title { get; set; } |
public string HtmlDesc { get; set; } |
public string Slug { get; set; } |
public string[] Images { get; set; } |
public decimal BestPrice { get; set; } |
}
|
But when i want to retrive the latest ID:
var data = _mongo.Products.AsNoTracking().Max(x => x.Id);
|
i get:
ArgumentException: Expression of type 'Master.Models.MasterProduct' cannot be used for return type 'System.Int32' |
Attachments
Issue Links
- included in Initiative
-
EF-77 Aggregate operations at top level
-
- Backlog
-