I have a simple query to a DBSet which is giving a typing error. When i debug it gives the following error: "The 'TranNumber' property on 'InventoryAdjustment' could not be set to a 'System.String' value. You must set this property to a non-null value of type 'System.Int32'. ". Here is the code of the query:
var filter = DataContext.InventoryAdjustments.Where(x => x.RecStatus == 0 || x.RecStatus == 4).AsQueryable();
And the declaration of the field in the entity which is filtered:
[Column("TranNumber")]
public int TransactionNumber { get; set; }
Since "filter" is an anonymous variable, i don't understand which is the mapping problem to result in that error.